i've created a standard zend form with some simple zend element and one DOJO date picker.
$fromDate = new Zend_Dojo_Form_Element_DateTextBox('fromDate');
$fromDate->setLabel('From Date')
->setDatePattern('dd-MM-yyyy');
$this->addElement($fromDate);
It works as expected. i can select the date from the associated dropdown. But is it possible to render t开发者_开发问答he label as well as the element separately?
On the ordinary zend elements i use the following in my view:
<?php echo $this->form->headline->renderViewHelper() ?>
to render the element and to render the label:
<?php echo $this->form->headline->renderLabel() ?>
(I'm not sure about the 'renderLabel' function' i can't find an example right now )
Is it possible to render the label and element separately on the DOJO element?
->renderLabel()
works with both Zend_Form object or Zend_Dojo_Form
However, when you're using Zend_Dojo_Form, you must use ->renderDijitElement()
instead of ->renderViewHelper()
.
精彩评论