Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Restoring OTHER form field after submit
September 23, 2005, 5:43 am
rate this thread
On an HTML page with 2x different forms, how can I redisplay the same
page after a submit, restoring the values from BOTH forms even though
only one was submitted?
I have an existing PHP program that I am modifying, and need to
redisplay the same page after a submit (the button that submits is a
"change shipping" button, that allows the user to continue with the
rest of the page). The problem is that there are TWO forms - the one
that allows you to change shipping, and the other where the user can
fill in the billing address. Making this into one form is not really an
option, due to how the program is set up.
Since they are 2 different forms, submitting the "change shipping" form
does NOT bring the billing address fields to my PHP code in the POST.
This makes restore difficult.
I have a couple of kludgy ideas on how to work around this (mostly
form when the user is changing the billing fields). However, I was
wondering if there were any other easy solution to acheive this.
- Benjamin Niemann
September 23, 2005, 2:56 pm
Re: Restoring OTHER form field after submit
Correct - any changes that the user made to the other, not submitted form
The only thing you can do is to recreate the other form with the values as
they where when the page was sent to the browser (an easy task, if the form
was not prefilled ;)
You'll have to look at the code that created the page and clone the relevant
pieces - which is not a HTML related task, so you better look for a PHP
group/forum for help (or perhaps even a group for this specific shopping
application, if there is one).
you *can't* (on a public site).
Email: pink at odahoda dot de
WWW: http://www.odahoda.de /
- » Script for migrating HTML tree into a single directory ?
- — Next thread in » HTML Authoring Forum