Hi Everyone,
I'm trying to figure out how to get a field's id using javascript and
assigning the id to a variable from within ZF.
I have form A that adds sub-form B that adds field F. When the form
is rendered field F is named "a[b][f]" with an id of "a-b-f".
I'd like to not hard-code the field id as "a-b-f" so that I can re-use the
sub-form and nest it at any depth.
I can't figure out how to get the id of the field so that I can manipulate
it with javascript from the browser.
I create the form in the init() function and this is where I want to add
javascript using $this->getView()->headScript()->appendFile('file.js') so
I can keep the javascript associated with a particular sub-form together in
one place.
Is there a good solution?
Thanks in advance,
Jamie
If it is not obvious, I'm very new to web development - not programming - just
new to web development.