I have a simple 2-page form. Page 1 collects data from the user and page 2 is simply a disclaimer, acknowledgement of the disclaimer, and the submit button. The form is tied to a MYSQL table. The 'db save' is triggered when the Captcha is validated. In the database table, I see the fields automatically generated by the form code (id, etc.) and the disclaimer acknowledgement field (radio button of either 1 or 0) but all of the other fields that the user has completed are empty.
How can I get the data to be saved to the datebase from the 2nd page of the form? I don't want to save the data if the user hasn't acknowledged the disclaimer and paid via PayPal (but for now, I have the DB save happening before the PayPal event).
Thanks!
Hi DaveNagy,
You need to use the Multi-Page action to make sure that data is transferred from the first page to the second. I would then save the data with a status column saying 'unpaid' and update the record when payment is confirmed.
Bob
Bob,
Thanks for replying! I have since found a solution that works. I was looking for a way to 'hold' the data until I've gotten confirmation from the user that the captcha was OK after the user acknowledged a disclaimer. I didn't want orphan data in the database if I tried saving it at the end of page 1 and the user didn't click 'ok' on a radio button.
I searched the various actions I could insert into the form on the 'setup' page and stumbled across the 'session' actions and thought that since the web (and thus the form) are session-less protocols that the two actions there, 'data to session' and 'session to data' would help me and they did.
In the 'on load' section, after the 'HTML (render form)' action, I added a 'data to session' and chose 'no' to merging the data. I added this action also on page 2 in the same place.
The key was adding a 'session to data' action in the 'on submit' section after the 'check captcha' and before the 'db save'.
All of the data entered into the forms is now saved in the database upon a successful captcha check.
I have screen prints showing the code in the setup section - how do I upload these to this forum?
Thanks, again!
Dave
Hi DaveNagy,
I have screen prints showing the code in the setup section - how do I upload these to this forum?
If you use the Reply Button (but not Quick Reply) there is a Choose File upload button under the editor window.
!! You must Upload the file (or files) before clicking Submit !!
Bob
Here are the screen shots showing how I placed the 'session' actions in my 2-page form to preserve the data the user entered on page 1 while the user completed page 2.
Note that you do not see the PayPal action item - this web site is an exercise to demonstrate to our Board of Directors (a non-profit organization) how we can build and manage the content ourselves to save money and improve timeliness of getting info to our members and to the general public.