-
Posts
1,358 -
Joined
-
Last visited
-
Days Won
16
Everything posted by elabx
-
Why is a simple calendar so hard to find?
elabx replied to OrganizedFellow's topic in General Support
Yes I'd recommend this too! -
Searching a ProFields Table from within ready.php hook code
elabx replied to JayGee's topic in API & Templates
I think it should be: $page->fixtures->find("team_a=$teamA,team_b=$teamB"); -
https://processwire.com/docs/fields/dependencies/
-
This is not possible right now, but it is definitely possible to implement, though I highly doubt Ryan would prioritize this right now, you have a better chance giving it a shot yourself editing the module's code and setting up the role/permissions yourself.
-
integrating payment process in a user registration form
elabx replied to JeevanisM's topic in General Support
I think this might be the issue, LoginRegister supports starndard fields. At least says so in the description of the "Registration form fields" field, in the module's configuration. -
integrating payment process in a user registration form
elabx replied to JeevanisM's topic in General Support
In what context are you trying to output it? Do you mean in a tempalte, after "first login"? Could I see some code? -
What have you tried? Have you tried any of these suggestions?
-
integrating payment process in a user registration form
elabx replied to JeevanisM's topic in General Support
what a great use case of that field! -
integrating payment process in a user registration form
elabx replied to JeevanisM's topic in General Support
Take a look at what the payment gategay sends as a response in the return url and use that to check true a "Paid user" field in the user. $user->of(false); $user->paid = true; $user->save('paid'); Here I asume you already got $user with data you got on the return url. -
integrating payment process in a user registration form
elabx replied to JeevanisM's topic in General Support
Just to be clear, I was refering to FormBuilder's Stripe integration. So you'd have to consider that also. I have not used the payment feature with Stripe, so I couldn't tell you more details on how to implement this, but here is a pretty nice documentation page: https://processwire.com/store/form-builder/stripe/#hooks-reference. So a hook on chargeSuccess, chargeFail should help you implement what you want. Or, another option I guess (maybe even more reliable?), could be using Stripe's webhooks. Add a checkbox field to the user template, that's what I meant. -
integrating payment process in a user registration form
elabx replied to JeevanisM's topic in General Support
I'd use LoginRegister module for registering the user, and then taking them to a form with FormBuilder that later basically just flags the user as paid (on a checkbox field for the user template) on a hook after payment. EDIT: Just re-read that you want the users to pay first before actually registering them, I'd still try to find a way to use FormBuilder to simplify the payment part and just use hooks to validate the form and create a user. -
Or a query param if you set the forms to use the url params? Otherwise sound like a plan, check for a specific email and just update the form settings you need to, before processing. I haven't really been exactly in your scenario, but a hook does feel like the best option here and have used hooks extensively to hack form builder and works wonders. I then use either a chrome extension to fill the forms, for example this extension always uses the domain "xxx@mailinator" . Or write a small javascript that fills the forms and I call it from the browser console if i need more control.
-
Finally got around to playing with UIKIT: it's great but ...
elabx replied to OrganizedFellow's topic in Dev Talk
Wow I hadn't done this and realize there's a lot of good stuff i didn't know about! -
Finally got around to playing with UIKIT: it's great but ...
elabx replied to OrganizedFellow's topic in Dev Talk
Silly question but, have you included the javascript library?? Also maybe just another silly mistake, but you point to UIKit v2 tutorials, shouldn't you be looking for UIkit v3 tutorials? I've been using all most of UIkit as my go-to library on a lot of projects now, really includes most of the stuff I had to glue up one time or another with different js libraries . I wish they had kept the "per component javascript file" , now everything is bundled. I remember it used to be the other way around. -
https://processwire.com/api/ref/sanitizer/ I think this docs page documents it pretty well!
-
You can embed a form in an iframe using: $forms->embed('form-name');
-
I've used cleave.js for this a couple times (though with currency formatter, but i see phone formaters too) and it's pretty straightforward to integrate through custom javascript. AdminOnSteroids does this for text fields too, but since I was also using a Table module, had to go and write a bit of js. And as @LostKobrakai suggests, before submission i just remove the formatters and save the fields with just their numerical values.
-
I've had this issue where I'm getting 301 redirects on their own when navigating through the website menu. For example: I click on url: www.site.com/hotels/rooms/ And get instantly redirected to: www.site.com/fr/hotels/rooms/ It only happend with that particualr page!! I don't have ProcessRedirects or anything like that. Also went through my htaccess already to find any unwanted redirect there but nothing. It's very strange because it only happens on this particular page. The page itself doesn't seem to have anything weird at all. Using ProcessWire 3.0.68 EDIT: I basially changed the page name of the default language and it got solved. I'll have to analyze further what exactly happened that matched the page to ask for a redirect
-
Best practice for building two sites on the same processwire install
elabx replied to blanco's topic in General Support
Here's what's on the official docs about multisite setups: https://processwire.com/docs/more/multi-site-support/ If you have access to the server's system, you could symlink the files of one Site A folder to the template files of Site B so you can keep template updates in sync. -
Save page in PageTable field before close event on Add New modal.
elabx replied to elabx's topic in General Support
Hi everyone! Back to this topic hehe. I'm having the issue that after a PageTable modal closes, it refreshes the table and I loose all the edits I did on render with the previous hook. I just can't seem to find where I have to hook to alter the table render on that ajax call. I see there is an InputfieldPageTableAjax class, but I don't make sense if it's there where i have have to hook and from what I can tell, the renderAjax() method from that class calls the render method from the Inputfield! Any clues on this? -
Yes, it adds the fields according to the markup!
-
I solved this like this: $wire->addHookBefore('ProcessPageEdit::buildForm', function(HookEvent $event) { $ppe = $event->object; $page = $ppe->getPage(); if($page->template != 'transaccion') return; $pageInputfields = $page->getInputfields()->children(); if($event->user->hasRole('asesor') && $page->transaccion_enviar_admin){ foreach($page->getFields() as $field){ $event->addHookAfter("Field::editable", function($event){ $event->return = false; }); } } }); BUT, I have to turn on access control on the fields and set the fields to be viewable even if not editable. (the checkboxes at the bottom)
-
Hi everyone! Just came back with another issue trying to solve this "dynamic field access" thing. I've implemented the previous hook @Robin S kindly gave me, but I now have the issue that if I visit the page a second time and save the page again while the conditions within are met (I visit the page a second time, and the fields show as their rendervalue) , the fields data gets deleted! Anyone got any clues on this? I wonder if I have to put a flag somwhere when the form is submitted?
-
echo $page->render; Just take into account that this will render the header and footer if you have included them on the child pages templates.