Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CF question 2 (about list)

Status
Not open for further replies.

volcano

Programmer
Aug 29, 2000
136
HK
Hello, here's the second question that need your solutions

If I have three form text fields, and they have the same name, say "txt". So when I fill them with data, say "abc", "def", "ghi" respectively and submit the form, I will get the "List" (abc, def, ghi) of this field (#form.txt#).

But if I have another value entered in the , say, first text field and the value is "abc, 123", then when I submit the form, the result will be "abc, 123, def, ghi", which
will mess up the #ListLen# from 3 to 4. How can I solve this problem?

Thank you very much!
 
Hi!

Stop using text fields that has the same name and generate dynamic text fields name like: txt1, txt2, txt3, etc...

This way when the form will be submitted you will be able to access each value separatly...

I think it's the best way to do since your working with user input... and a user could completly "fuck up" your list by entering like you said: "abc, 123" in the text field.

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top