I am using two decorator - To get tabular form alignment - To get date picker (ZendX_JQuery_Form_Element_DatePicker)
her ikisi de, aynı zamanda tek tek çalışan, ancak değildir
Hata:
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.
Benim alın Form Fonksiyon:
$form = new Form_Job();
$form->setDecorators(Decorator::$formDecorators);
$form->setElementDecorators(Decorator::$elementDecorators);
$form->getElement('submit')->setDecorators(Decorator::$buttonDecorators);
Form sınıfı Form_Job ()
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);
}
}
I http://framework.zend.com/manual/en/zend.form.decorators.html bu yardım aldım
jQuery Decorators: Beware the Marker Interface for UiWidgetElements
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.
Ama bunu uygulamak için kodu gerekir, tavsiye lütfen