[thelist] ASP: help with forms and ampersand

Anthony Baratta Anthony at Baratta.com
Sat Oct 21 19:09:34 CDT 2000


You might want to redesign your setup and make your life easier. I just went through
a project that went through enough incremental changes that our initial setup/code
was scrapped and we started over. It ended up being less pain to re-think our design
flow than trying to adapt the initial design to the new functionality.

Thank being said - chart out the form flow and then sit down and write the code to
follow the flow.

e.g. Have the ASP page write the Main form if nothing is being posted to the page.
Have a hidden field called "Phase" and set it to One for the Main form. Then when the
form is posted, look for Phase=One. Act on that by looking for the three main fields.
If not filled out - toss back the main form with an error message. If the three
fields are fine, and nothing else is filled out, dump the data in your favorite
storage area ( or mail it ) and show a thank you page. If you have "extra fields"
then show Form Two, with Phase=Two (and the three fields from the Main form either
hidden or pre-filled out on Form Two).  One post you'll need to look for Phase=Two
and act accordingly.

Hope that helps - or at least does not hurt.

Anthony Baratta
KeyBoard Jockeys
                    South Park Speaks Version 3 is here!!!
                              Powered by Tsunami

More information about the thelist mailing list