Guest User

Untitled

a guest
Jun 22nd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. 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.
  2.  
  3. $form = new Form_Job();
  4. $form->setDecorators(Decorator::$formDecorators);
  5. $form->setElementDecorators(Decorator::$elementDecorators);
  6. $form->getElement('submit')->setDecorators(Decorator::$buttonDecorators);
  7.  
  8. class Form_Job extends ZendX_JQuery_Form {
  9. public function init() {
  10. $element = new ZendX_JQuery_Form_Element_DatePicker('date_from');
  11. $element->setLabel('Campaign Period From :');
  12. $element->setRequired(true);
  13. $element->setAttrib('size', '10');
  14. $element->setJQueryParam('dateFormat', 'yy-mm-dd');
  15.  
  16. $this->addElement($element);
  17. }
  18. }
  19.  
  20. public static $formJQueryElements = array(
  21. array('UiWidgetElement', array('tag' => '')), // it necessary to include for jquery elements
  22. array('Errors'),
  23. array('Description', array('tag' => 'span')),
  24. array('HtmlTag', array('tag' => 'td')),
  25. array('Label', array('tag' => 'td', 'class' =>'element')),
  26. array(array('row' => 'HtmlTag'), array('tag' => 'tr')),
  27. );
  28. $form->getElement('jq_date')->setDecorators(Decorator::$formJQueryElements);
Add Comment
Please, Sign In to add comment