in reply to Re^6: Copy data from one form to another?
in thread Copy data from one form to another?
Make one form with two sumbit buttons both with the name "action" and one with a value "search" and the other with the value "edit".
In your script, read param("action") and if it is "search", search the database and then redisplay the same form with the values filled in. If the action is "edit", update the database with the new information and then redisplay the same form again so they can search again. If there is no param("action"), that means the user is just starting so you display the same form, but with blanks.
You only ever have one form, it just has different values filled in or blank depending on context. And you only have one script that does different actions with the database depending on the action param. Does that make sense?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Copy data from one form to another?
by fmogavero (Monk) on Mar 11, 2005 at 21:44 UTC |