Jump to content

posting variables back to a form


feck

Recommended Posts

I need a way too post a form value that a user has picked and wants to change back to the previous page and poplulate the appropriate field.I can do this with text boxes/text fields using hidden form fields to post back to the previouse page but not with select boxes.How do I make the select box point to the appriate option that the user has already selected?

Link to comment
Share on other sites

<select><option name='name_the_thing'>1</option><option name='name_the_thing'>2</option><option name='name_the_thing'>3</option><option name='name_the_thing'>4</option></select>Isn't this right?

Link to comment
Share on other sites

Maybe i did'nt explain myself properly.One page has a form that a user places values in text boxes & select/option boxes, once submitted the user is directed to a new page (confirmation page) with a list of the values they have chosen displayed, they then have the option too go back and change anything that they have chosen in error.Once the back button is pressed they are directed again to the form page with all of the textfields populated by their chosen data, by using hidden form fields from the confirmation page.But the select boxes are where I'm experiancing problems, I would like to be able to show the user their previously selected item. Bear in mind that this is not a multiple selection box, only one item can be picked.This would make it easier for the user too only change what needs changing and not having to reselect everything.

Link to comment
Share on other sites

Perhaps if you make it the way this board has, it would be best. If you see the Preview Post button, you'll see my point.In the conformation window, include the form itself with the inputted values. You can easily populate the values by simply taking the post data and redo the form with it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...