Does anybody know how one would go about looping through all the elements in a form using Dojo? (the form itself was created through the ZendFW Zend_Dojo_Form)
What I’m trying to do is go through all the fields/inputs in the form, and if possible, change their id value. However, even if its not possible to change the ID’s of fields I would still love to know how to loop through the form elements and access their properties/values.
Thanks!
Zend adds a variable of Dijits rendered on the page called ‘zendDijits’. Iterate through that, getting the original element by id (it’s the first item in the array), then using dojo set the id using:
Never done it before but that should work