Note that there are some explanatory texts on larger screens.

plurals
  1. POZend From Decorators not working with ZendX_JQuery_Form
    primarykey
    data
    text
    <p>I am using two decorator - To get tabular form alignment - To get date picker (ZendX_JQuery_Form_Element_DatePicker)</p> <p>both are working individually, but not at a same time</p> <p>Error:</p> <pre><code>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. </code></pre> <p>My Get Form Function: </p> <pre><code>$form = new Form_Job(); $form-&gt;setDecorators(Decorator::$formDecorators); $form-&gt;setElementDecorators(Decorator::$elementDecorators); $form-&gt;getElement('submit')-&gt;setDecorators(Decorator::$buttonDecorators); </code></pre> <p>Form class Form_Job()</p> <pre><code>class Form_Job extends ZendX_JQuery_Form { public function init() { $element = new ZendX_JQuery_Form_Element_DatePicker('date_from'); $element-&gt;setLabel('Campaign Period From :'); $element-&gt;setRequired(true); $element-&gt;setAttrib('size', '10'); $element-&gt;setJQueryParam('dateFormat', 'yy-mm-dd'); $this-&gt;addElement($element); } } </code></pre> <p>I got this help from <a href="http://framework.zend.com/manual/en/zend.form.decorators.html" rel="nofollow noreferrer">http://framework.zend.com/manual/en/zend.form.decorators.html</a></p> <blockquote> <p>jQuery Decorators: Beware the Marker Interface for UiWidgetElements</p> <p>By default all the jQuery Form elements use the ZendX_JQuery_Form_Decorator_UiWidgetElement decorator for rendering the jQuery element with its specific view helper. This decorator is inheritly different from the ViewHelper decorator that is used for most of the default form elements in Zend_Form. To ensure that rendering works correctly for jQuery form elements at least one decorator has to implement the ZendX_JQuery_Form_Decorator_UiWidgetElementMarker interface, which the default decorator does. If no marker interface is found an exception is thrown. Use the marker interface if you want to implement your own decorator for the jQuery form element specific rendering.</p> </blockquote> <p>But i need code to implement this, please suggest</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload