Tired of typing form variables

Results 1 to 2 of 2

Thread: Tired of typing form variables

  1. #1
    Join Date
    Dec 1969

    Default Tired of typing form variables

    I have 30 fields in a form and I&#039m using hidden fields to transfer the information form one page to the other. Is there a way to use a For Each loop to go through the form and write <BR><BR>field1=request.form("field1")<BR><BR>I&#03 9m thinking that there is a more efficient way to do this than to type them all out one by one. Anybody have any ideas?<BR><BR>Thanks,<BR><BR>Howard

  2. #2
    peterjl@austec.net.au Guest

    Default RE: Tired of typing form variables

    If you just want to create a series of hidden fields to capture each formfield value that is passed to it the following will do it:<BR>&#060;%<BR>for each f in request.form<BR>response.write "&#060;input type=hidden name=""" & f & """ value=""" & request.form(f) & """&#062;"<BR>next <BR>%&#062;<BR><BR>Of course you would also have to enclose them in form tags and you would have to submit that from in order to pass on the values.

Posting Permissions

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