ajax - How to create an AJAXified form within the Zend Framework -
i'm trying create contact form. @ top of form user can select using radio buttons whether he's contacting technical department or marketing department. depending on selects, entire form changes.
how implemented within zend framework? i'm extending zend_form make forms. i'm working within mvc style , rather not break out of it.
right
echo $this->form;
in view render form. i'm guessing when visitor clicks on 1 of radio buttons, controller need set different form, i'm not sure how go without re-rendering entire page.
thanks!
edit i'm thinking setting in controller:
$this->view->contactformtechdep = $formtechdep;
$this->view->contactformmarketingdep = $formmarketingdep;
and render both, hiding 1 using javascript.
i think need show/hide content of form javascript, not php. (with jquery can easyli done)
but you'll have keep in mind unobtrusive users without javascript enabled
Comments
Post a Comment