Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: "Dynamic" HTML Forms, Tracking Data and Trepidation

by screamingeagle (Curate)
on Feb 07, 2002 at 19:18 UTC ( #143952=note: print w/replies, xml ) Need Help??

in reply to "Dynamic" HTML Forms, Tracking Data and Trepidation

One way to do it would be :
Design the form so that along with the Contact Information and Billing Information , you have , say, 3 input fields for Requests (say Request1, Request2 and Request3)...keep a submit button after that which says "Add more Requests". (Keep in mind that this submit button is in addition to the default submit button which says "Finished Adding Reuests" or something to that effect ) Now, when the user presses the "Add more Requests" button, the form should save into the database all the information that the user has added so far , and after the data is saved, the form should be loaded again displaying all the saved data in an editable format,ALONG with 1 additional input box for the additional request that the user wants to make...this process can continue till the user presses the "Finished Adding Reuests" button, which ends the process...
The advantage of this approach is that the user can not only add more requests, but he/she can edit the information previously added and update that information...
you'll have to write a function which checks whether you need to fire an "UPDATE" SQL statement or an "INSERT" statment... shouldnt be too hard since u can make those checks using the primary keys of the data already entered..
hope this helps :)
  • Comment on Re: "Dynamic" HTML Forms, Tracking Data and Trepidation

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://143952]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2017-03-30 09:10 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (355 votes). Check out past polls.