Randomely generated numbers for select elements
akira <nhytro-python-S0/[email protected]>
| Newsgroups | gmane.comp.python.formencode |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
I have javascript code that allows me to duplicate HTML select elemets,
although the users can delete the elements, each newly generated element
gets a new name number in ascemding order, for example:
<input id="test-0" type="checkbox" name="test-0" value="${c.publicize}"
checked="${c.publicize}">
<input id="test-1" type="checkbox" name="test-1" value="${c.publicize}"
checked="${c.publicize}">
<input id="test-2" type="checkbox" name="test-2" value="${c.publicize}"
checked="${c.publicize}">
this works till the user posts the form, and I create new elemenets
based on waht I retrieved from formencode, since I just generate new
names and ids in ascending order, things get out of sync on the front-end.
I wpuld like to know if formencode can also deal with randomly generated
values like:
<input id="test-131"
<input id="test-424"
<input id="test-244"
would I still be able to access the values with my existing code, would
they still be grouped?
thanks
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/