retrieve dynamic form fileds - hope someone would

Results 1 to 3 of 3

Thread: retrieve dynamic form fileds - hope someone would

  1. #1
    meeta Guest

    Default retrieve dynamic form fileds - hope someone would

    Here is my problem. <BR>Form is broken up into 4 pages. On first page one would enter info for a spcific product, on second page they would select categories applied which is being displayes off the databse. on third page based on these categories, they would be entering descrption for each category. Now i&#039;m able to show the name of category & textarea next to it. But how can i "name" these fields so that i can retrive it on the next page. Remeber its being displayed in the loop. As its dynamic we are not sure how many fields would be there.<BR><BR>So far i&#039;m not lucky enought to get answer to my question. Maybe I need friends like AK, Vivaldi, Jamie of the genious ASP guru&#039;s<BR><BR>Hope to get answer this time <BR>thanks in advance<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: retrieve dynamic form fileds - hope someone wo

    Name that sequentially...<BR><BR>text1<BR>text2<BR>text3<BR> <BR>You can name them in a for loop, like so:<BR><BR>For i = 1 to whatever<BR>&#060;"&#060;%="text" & i&#062;"&#062;<BR>Next<BR><BR><BR>Then to retrive them, do the same:<BR><BR>For i = i to whatever<BR> myarray(i) = Request.Form("text" & i)<BR>Next<BR><BR>It helps to pass "whatever" over so you know the ubound...<BR><BR>alternatively, you can do:<BR><BR>For each thingy in Request.Form<BR>...<BR>next<BR><BR>But this brings back all form elements

  3. #3
    meeta Guest

    Default RE: retrieve dynamic form fileds - hope someone wo

    thanks for the answer. It feels great to get answer on this board. Where I learned a lot by browsing on board. <BR>in my case i&#039;m not sure how to incorporate solution you suggested. Sorry to sound dumb!<BR><BR>here is my code: this does show industryname & textarea. I need to retieve it to next page - finally it goes to the database. <BR>iid = Request.querystring("iid")<BR>dim strlSizes, arrlSizes, l<BR>arrlSizes = split(iid, ", ", -1, 1)<BR><BR>set rsl=Conn.execute("SELECT * from industries order by industryname asc")<BR>while not rsl.eof<BR> tempiid = rsl("industryid")<BR><BR> for l = lbound(arrlSizes) to ubound(arrlSizes)<BR> arrlid = CInt(arrlSizes(l))<BR> If tempiid = arrlid then <BR> Response.Write "<BR>&#060;font face=arial helvetica size=-1&#062;" & rsl("industryName") & "&#060;/font&#062;" <BR> %&#062; <BR> <BR> <BR>&#060;TEXTAREA cols=40 name= &#060;%=rsl("industryName")%&#062; rows=2&#062;&#060;/TEXTAREA&#062;<BR> <BR>&#060;%<BR>end if<BR> next<BR> rsl.movenext<BR>wend<BR>%&#062;

Posting Permissions

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