2

I am trying to create form element using Zend_Config_Ini. Among other elements, I have a datepicker element (zendx_jquery_form_element_datepicker) which fails to work.

I have tried setting the element like so:

user.login.elements.Date.type = "datePicker"

and

user.login.elements.Date.type = "zendx_jquery_form_element_datepicker"

either way ends in the same error message:

Plugin by name 'Zendx_jquery_form_element_datepicker' was not found in the registry; used paths: Zend_Form_Element_: Zend/Form/Element/

or

Plugin by name 'DatePicker' was not found in the registry; used paths: Zend_Form_Element_: Zend/Form/Element/

Please help, thanks.

Andrey Agibalov
  • 7,624
  • 8
  • 66
  • 111
pi.
  • 1,441
  • 3
  • 19
  • 25

3 Answers3

1

Just add prefix path before form config

 $form = new Zend_Form();
 $form->addPrefixPath('ZendX_JQuery_Form_Element', 'ZendX/JQuery/Form/Element', 'element');
 $form->setConfig($config->form);
Michael
  • 496
  • 3
  • 8
0

Try

user.login.elements.Date.type = "DatePicker"

The class name is class

ZendX_JQuery_Form_Element_DatePicker 
DaveShaw
  • 52,123
  • 16
  • 112
  • 141
Leopard
  • 23
  • 4
-1

I dont know how to make form using ini file. But I know Zendx_jquery_form_element_datepicker is not standed zend form element. It is make by ZendX. So you cant use it as zend element.

Dinuka Thilanga
  • 4,220
  • 10
  • 56
  • 93
  • 1
    Thanks. I know the datepicker is not a standard Zend Form element, however, it does extend the Zend Form Element (I think) and as such might be able to behave as such. My opinion is that there might be a need to search within the ZendX folder to pickup this and others. Any ideas? Anybody? Thanks – pi. Sep 01 '11 at 17:38