I'm generating a form from a database which makes it so I do not know how many elements there are going to be before hand. To keep track of the data, I am using an array such as
This works great to process the form submit since I get an Array I can use in PHP.
Since these are the only selects in the form, I can use getElementsByTagName to collect the elements such as
This though seems like a bad kludge. If I add another select to the form or even a different form on the page, I will create all sorts of problems.
Any ideas on how to access the widget array directly?