How to create form elements and labels horizontally without decorators help.
// Add the comment element
$this->addElement('text', 'txt_password', array(
'label' => 'Password:',
'required' => true,
'validators' => array(
array('validator' => 'StringLength', 'options' => array(0, 20))
)
));
Tray its
$this->addElement('text', 'txt_password', array(
'label' => 'Password:',
'required' => true,
'decorators' => array(
'ViewHelper',
'Description',
'Errors',
array(array('elementDiv' => 'HtmlTag'), array('tag' => 'span')),
array('Label', array('tag' => 'span')),
),
'validators' => array(
array('validator' => 'StringLength', 'options' => array(0, 20))
)
));
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.