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

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -