|
Posted by Steve JORDI on 05/14/07 13:27
Hi,
is there a way to read the content of a form variable before
a POST?
I have a form with a "duplicate" button which opens a new form
with most of the fields filled with the values of the calling one.
To do so, I pass the id of the form to be duplicated.
Example:
- I have a form with "Number = 1234567" in a "numform" edit field.
- Duplicate has a href=/duplicateform.php?id=1234567
- then the "duplicateform.php" reads id with a GET['id']
This is easy as I come from a displayed form that retrieves its
values via a SQL statement and with a specific "number" reference.
Now, once I am in this new form, I have a save button to save all
values, including the new "Number" the user would type in, say
"22222222". The save process works correctly via AJAX and saves the
record using a POST action.
But then, I still have my "duplicate" button which should now
point to href=/duplicateform.php?id=22222222
How can I get this 22222222 value from within the form itself?
I have to get it from the "numform" field, but how can I do this?
it would be something like
href=/duplicateform.php?id=<?=[value_of_field_number]?>
with value_of_field_number being the actual value of that edit field.
Any help would be appreciated.
Sincerely,
Steve JORDI
(Remove the K_I_L_LSPAM from my email address)
------------------------------------------------
1197 Prangins Email: stevejordiK_I_L_LSPAM@hotmail.com
Switzerland WWW: www.sjordi.com
------------------------------------------------
Volcanoes at www.sjordi.com/volcanoes
MovieDB at www.sjmoviedb.com
------------------------------------------------
[Back to original message]
|