1

I have a form I created with Zend_Form (or Zend_JQuery_Form now).

I have a select box in the form and I would like to do a call-back to the server when the user selects a value (to create dependent select boxes).

Is there any way to specify the "change" event code from the server side? or just to write the jquery client side myself?

Thanks.

1
  • i would implement it by my self (Jquery Support will be stopped in ZF 2) Commented Sep 8, 2011 at 12:08

1 Answer 1

0

Yes. That is possible to add in the server side itself. While creating your form element, add the details for the onchange event like shown below.

$titleElement = $form->createElement('text', 'title', array(
'onchange' => 'alert(this.value);'
'label' => 'This is the title'
));
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.