I have been through a number of examples, but dont think I have
found/understand what i need to do.
I have a form that i want the rendered html to look like this (or similar):
----------------
First Name:<input name="first_name" value="">
javascript:document.myform.getElementByID('first_name').value click here
Last Name:<input name="last_name" value="">
----------------
I have a zend form created by:
----------------
class My_Forms_Names extends Zend_Form{
public function init()
{
$this->addElement('text', 'first_name', array(
'filters' => array('StringTrim'),
'validators' => array(
'Alpha',
array('StringLength', false, array(2, 50)),
),
'required' => true,
'label' => 'First Name',
'class' => 'text',
));
$this->addElement('text', 'last_name', array(
'filters' => array('StringTrim'),
'validators' => array(
'Alpha',
array('StringLength', false, array(2, 50)),
),
'required' => true,
'label' => 'Last Name',
'class' => 'text',
));
$this->addDisplayGroup(
array('first_name', 'last_name'),
'nameinfo',
array(
'disableLoadDefaultDecorators' => true,
'decorators' => array(
'FormElements',
array('HtmlTag', array('tag'=>'ol')),
'Fieldset' ),
'legend' => 'Trips:',
)
);
}
}
----------------
I want to be able to insert '
javascript:document.myform.getElementByID('first_name').value click here '
in between the two name fields.
Any suggestions or examples would be great.
Thank you.
--
View this message in context:
http://www.nabble.com/Insert-HTML---JS-in-to-middle-of-a-zend_form-tp21057511p21057511.html
Sent from the Zend Framework mailing list archive at Nabble.com.