I have a FORM (call it FORM 1) that a user fills in with Name and email and a few other choices. After some other steps IN THE SAME SESSION, the user will be taken to a second form (FORM 2) which appears for the user to enter additional additional information. Both forms will be emailed (which works fine) to the user and us.
In FORM 2, I want to repopulate the name and email, and maybe one other piece of data data from FORM 1 to appear in Form 2 so they do not have to enter it again. The user may or may not be logged in, and I do not care. And if they log out or leave before they get to FORM 2, they will have to fill out FORM 1 again, so the data does not have to survive very long actually.
So following tutorial #5 (http://www.chronoengine.com/tutorials/52-5-saving-data-to-the-database.html), I created a DB Table as instructed, and attached it to my FORM 1 to save the data elements I wanted. This works just fine, and I have successfully seen the data in a table using the forms management tools. But now I want to use that data in FORM 2, and it s not working. This is where I need help. Here is what I have done so far after that:
1) In FORM 1, I have enabled the Profile plug-in by checking the little box.
Question: What value do I put in the small field next to the plugin where it has the + and - value setters? I set it to 0 just to have a value. Does it even need one?
2). In FORM 2, I have also enabled the Profile plug-in and set its value also to 0.
Question: Is the value necessary here? I tried them both blank too, no difference.
3). In Form 2, I selected Profile Management and then selected my table from the drop down menu.
Question: I can only select one field name here. What if I want to use more? What is this field select for? Which field do I select? Does it matter? (I selected the first cf_id since it did not seem to matter.)
Question: Do I also have to do this in FORM 1? Doing so made no difference.
4). The text fields I want are called text_28 (name) and text_27 (email). They are in the table from FORM 1 and populated.
I added this code to the HTML of FORM 2:
Name: {text_28} <br />
Email: {text_27}
I have had two results. One time and one time only, the fields came back blank when FORM 2 was displayed. Now, they simple show up EXACTLY as typed above, showing the text "Name: {text_28}" etc right in the form. No substitution is made for the data in the table.
Question: What have I left out or set wrong? I cannot make this work.
A few more questions:
1). Will this method of saving form data to a table cause problems if more than one user is using the same form at the same time? Or is the table somehow session related, and I do not have to worry about collisions? Users may or may not be logged in.
2) The table populates with many entries, the more I test, the more entries I get. How does FORM 2 know which entry to use? It seems as if I can end up with another's data here. How do I make sure the proper data moves forward?
3). If I made an error in the table (say I want more fields now), how do I edit or delete it? This does not seem to be possible from the forms management area. And trying to replace it causes an error. How do I do this?
I suspect this is easier than I think, so perhaps this is just above my skill level showing through. I have experimented with many settings, but I am just shooting in the dark because I do not know what the settings really mean.
Any help would be appreciated. Perhaps it is all there, and I just do not understand settings?
Thanks in advance.
-Owen Rubin-