dvst8
Aug 23rd, 2000, 04:20 PM
I have a form whose number of hidden fields grows dynamically. I employ a naming convention such as <itemName>_Number for the names of the hidden fields.
Here's an example of part of a form:
<input type="hidden" name="itemNum_4">
<input type="hidden" name="desc_4">
<input type="hidden" name="quantity_4">
<input type="hidden" name="issue_4">
<input type="hidden" name="unit_4">
<input type="hidden" name="itemNum_5">
<input type="hidden" name="desc_5">
<input type="hidden" name="quantity_5">
<input type="hidden" name="issue_5">
<input type="hidden" name="unit_5">
<input type="hidden" name="itemNum_6">
<input type="hidden" name="desc_6">
<input type="hidden" name="quantity_6">
<input type="hidden" name="issue_6">
<input type="hidden" name="unit_6">
My problem is how to process this form??
I'm not quite sure how to loop through the Form collection to get at all these fields for which I don't know the exact name. Once I get the field name, I can parse it and determine how to procede.
I think this is probably fairly simple, but all the form processing I have done thus far involved only forms for which I knew exactly which fields were in the form. Variable length forms seem a bit tougher to tackle.
Please let me know.
dvst8
[Edited by dvst8 on 08-23-2000 at 05:24 PM]
Here's an example of part of a form:
<input type="hidden" name="itemNum_4">
<input type="hidden" name="desc_4">
<input type="hidden" name="quantity_4">
<input type="hidden" name="issue_4">
<input type="hidden" name="unit_4">
<input type="hidden" name="itemNum_5">
<input type="hidden" name="desc_5">
<input type="hidden" name="quantity_5">
<input type="hidden" name="issue_5">
<input type="hidden" name="unit_5">
<input type="hidden" name="itemNum_6">
<input type="hidden" name="desc_6">
<input type="hidden" name="quantity_6">
<input type="hidden" name="issue_6">
<input type="hidden" name="unit_6">
My problem is how to process this form??
I'm not quite sure how to loop through the Form collection to get at all these fields for which I don't know the exact name. Once I get the field name, I can parse it and determine how to procede.
I think this is probably fairly simple, but all the form processing I have done thus far involved only forms for which I knew exactly which fields were in the form. Variable length forms seem a bit tougher to tackle.
Please let me know.
dvst8
[Edited by dvst8 on 08-23-2000 at 05:24 PM]