Hi all,
I have built a multi-page form by simply creating a separate form for each step and linking them together using the "submit" button and the "redirect to another url" confirm option. Each form saves the data to a mysql database and writes to $_SESSION variables.
On each page, I have also created links to every other step of the form so that the user can revisit a step if needed. My issue is, if a user is on Step 3 and needs to go back and change the information in Step 1, and clicks the link to the Step 1 page, how do I get the form fields in Step 1 to auto-populate to reflect the data that was originally entered by the user? That way the user can simply change the field(s) needed and all other information will be shown - in the respective form fields - as originally submitted.
Can I call the sql data using SELECT WHERE to populate the respective fields? I imagine that's possible, and probably easier, by using the $_SESSION variables, but if those are lost I would like the user to be able to log off and back in and pick up with their form progress where they left off.
Any help would be much appreciated.
Auto-populating form fields
You can either use cookies to store the data or write the data to a database using ajax.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.