views:

242

answers:

1

Currently I can add a Zend Form element dynamically to a form after it is first loaded. I do this through a mouse click and some ajax. However, I want to add the exact same element with a different name (basically I am giving each element an id). However, when I add the field it just shows up like a normal field and isn't Dojo'fied.

+1  A: 

Dojo Form elements have to be initialized. This usually happens when the page is served to the browser when the DOM is ready. Dojo will parse the page and startup the form elements. When you get the elements through Ajax or create them dynamically, you have to startup the new elements again. I remember this to be somewhat tricky though.

See these related questions:

Gordon
Thanks, I looked over those and decided that I am going to preload a few and hide them instead. Seems like that way is going to be to difficult to get working.
Joe