Hello,
I need advice in how to implement the following. Before the form is rendered, I need to check a database record. If true, a message is displayed, if not the form is then displayed. It essentially is an event registration for register users and I want to prevent any user from submitting twice. So on submit I will have the database record updated that is checked at the beginning. I hope that makes sense.
In the old Chronoforms, I just did this all in the form code. Now with the new version it seems more modular and it looks like I need to do this in the setup tab, but not sure how to implement this if...else... Any ideas?
Thanks!
I need advice in how to implement the following. Before the form is rendered, I need to check a database record. If true, a message is displayed, if not the form is then displayed. It essentially is an event registration for register users and I want to prevent any user from submitting twice. So on submit I will have the database record updated that is checked at the beginning. I hope that makes sense.
In the old Chronoforms, I just did this all in the form code. Now with the new version it seems more modular and it looks like I need to do this in the setup tab, but not sure how to implement this if...else... Any ideas?
Thanks!
It is going to check in the CB table (yes/no field) whether the user is registered already (via the form). If "yes", then I want to display a message that their registration is confirmed along with some other info, if not then the registration form prints out.
If a user submits the form, I then have an onsubmit action that marks the field yes in the CB table (comprofiler).
If a user submits the form, I then have an onsubmit action that marks the field yes in the CB table (comprofiler).
Hi geejay,
I think I would do this using a Custom code action in the On Load event to check the CB database table and set a form data variable accordingly e.g. $form->data['is_registered'].
In the Designer tab I'd use two containers and display them (or not) depending on the $form->data['is_registered'] value. Set the Container to Type 'Custom' and then you can use PHP in the Start/End code boxes to hide or show it.
Bob
I think I would do this using a Custom code action in the On Load event to check the CB database table and set a form data variable accordingly e.g. $form->data['is_registered'].
In the Designer tab I'd use two containers and display them (or not) depending on the $form->data['is_registered'] value. Set the Container to Type 'Custom' and then you can use PHP in the Start/End code boxes to hide or show it.
Bob
This topic is locked and no more replies can be posted.