connecting asp forms then submitting form confirma

Results 1 to 2 of 2

Thread: connecting asp forms then submitting form confirma

  1. #1
    misty byrd Guest

    Default connecting asp forms then submitting form confirma

    I have 2 forms that I save as asp forms I want to use the next button to go to the next form after the form is completed I want submit the info off both forms and give a confirmation that it has been submitted also how can I check to see if I recvd the data from the forms.<BR><BR>Thank you<BR><BR>p.s. I&#039m a dumb blonde

  2. #2
    Join Date
    Dec 1969

    Default RE: connecting asp forms then submitting form conf

    Just copy the info in the first form into hidden fields in the second form. Then, when the second form is submitted the page it submits to will get all the info from both forms in one fell swoop.<BR><BR>If you don&#039t duplicate form field names on the two forms, this is especially easy to do. On the second page, *AFTER* the<BR>&#060;FORM ...&#062;<BR>line, just put in this code:<BR><BR>&#060;% For Each Item In Request.Form %&#062;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&#060;INPUT TYPE="HIDDEN" NAME="&#060;% = Item %&#062;" VALUE="&#060;% = Request.Form(Item) %&#062;" &#062;<BR>&#060;% Next %&#062;<BR><BR>That&#039s it! That will create one hidden form field with the same name as a field on the previous page and put the value from the field on the previous page into the field.<BR><BR>Minor caution: Any " marks in any of the form values from the prior page would mess this up. If you need to protect against that possibility, then a minor alteration:<BR><BR>&#060;% <BR>For Each Item In Request.Form<BR>&nbsp;&nbsp;&nbsp;&nbsp;val = Replace(Request.Form(Item),CHR(34),CHR(34)&CHR(34) )<BR>%&#062;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&#060;INPU T TYPE="HIDDEN" NAME="&#060;% = Item %&#062;" VALUE="&#060;% = val %&#062;" &#062;<BR>&#060;% Next %&#062;<BR><BR> easy, why not just do it and be safe.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts