Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Warning: Exception caught by form: Cannot render jQuery form element without at least one decorator implementing the 'ZendX_JQuery_Form_Decorator_UiWidgetElementMarker' interface. Default decorator for this marker interface is the 'ZendX_JQuery_Form_Decorator_UiWidgetElement'. Hint: The ViewHelper decorator does not render jQuery elements correctly.
- $form = new Form_Job();
- $form->setDecorators(Decorator::$formDecorators);
- $form->setElementDecorators(Decorator::$elementDecorators);
- $form->getElement('submit')->setDecorators(Decorator::$buttonDecorators);
- class Form_Job extends ZendX_JQuery_Form {
- public function init() {
- $element = new ZendX_JQuery_Form_Element_DatePicker('date_from');
- $element->setLabel('Campaign Period From :');
- $element->setRequired(true);
- $element->setAttrib('size', '10');
- $element->setJQueryParam('dateFormat', 'yy-mm-dd');
- $this->addElement($element);
- }
- }
- public static $formJQueryElements = array(
- array('UiWidgetElement', array('tag' => '')), // it necessary to include for jquery elements
- array('Errors'),
- array('Description', array('tag' => 'span')),
- array('HtmlTag', array('tag' => 'td')),
- array('Label', array('tag' => 'td', 'class' =>'element')),
- array(array('row' => 'HtmlTag'), array('tag' => 'tr')),
- );
- $form->getElement('jq_date')->setDecorators(Decorator::$formJQueryElements);
Add Comment
Please, Sign In to add comment