issue in Zend_Frame_ Select box validation in ajax call
i have created a country select box as $country= new Zend_Form_Element_Select('country'); in my user registration form .. While selecting an country an ajax call is send and getting the state list by creating another select box $state= new Zend_Form_Element_Select('state'); in another action say stateAction()
Problem is that when i tried to validate registration form in the POST action i cant retrieve the value from state $form = new Users_Form_Register(); eg as $userObjectDetails->sta开发者_开发技巧tename=$form->getValue('state');
as a solution i added tried to added a dummy variable $state in Users_Form_Register(); add addElement($state),unfortunately during value is loaded by ajax call the state list issue occure during validation of the form
please suggest a solution for the above Thank you
You could try validating with javascript. jQuery has a nice validation plugin that lets you attach the validator to the form ID and define the rules you want to validate.
精彩评论