Hi,

with Zend_Form on the horizont I was wondering if there is a preferred method 
of returning changes to a form element on a webpage after an ajax call.

For example when I select a certain checkbox and push a button on a form, an 
ajax call is made that should return an updated select element and disable 
another button.

Would I then build a Zend_Form_Element_Select and Element_Button in the 
controller, render them, put the output in an array, return the rendered 
elements to my javascript and replace the old elements?

Or can I serialize a Zend_Form_Element to JSON and use its public properties 
after eval()ing it to an object in my javascript? But AFAIK all the data in 
form elements is returned via methods, so this is not of much use on the client.

Another thought: Always transmitting complete form elements in an ajax return 
might not be very efficient if only one property of an element is changed by an 
action (for example "disabled")...

Right now I am using something selfmade (without Zend Form), but on the way to 
1.5 I'd appreciate your thoughts on this.

Thanks and best regards,

Georg


Reply via email to