Don't we all have some layout problems with the zend forms? :confused:
So what did I do? I don't know if it's totally correct but I created an
'form' element like text, file, textarea, ... but than a 'div'...
Something like this:
div.php
<?php
class Zend_Form_Element_Div extends Zend_Form_Element_Xhtml
{
public $helper = 'formDiv';
}
?>
FormDiv.php
<?php
class Zend_View_Helper_FormDiv extends Zend_View_Helper_FormElement
{
public function formDiv($name, $value = null, $attribs = null)
{
$info = $this->_getInfo($name, $value, $attribs);
extract($info); // name, value, attribs, options, listsep, disable
$endTag = '</div>';
$xhtml = '<div'
. ' name="' . $this->view->escape($name) . '"'
. ' id="' . $this->view->escape($id) . '"'
. $this->_htmlAttribs($attribs)
. '>' . $this->view->escape($value)
. $endTag;
return $xhtml;
}
}
You can call it the same way you do: createElement('div',
'test')->setLabel('blabla')->setValue('your hyperlink');
Hopes this helps
-----
http://www.phpscriptor.com/ http://www.phpscriptor.com/
--
View this message in context:
http://www.nabble.com/Links-in-Zend-Form--tp20125588p20130490.html
Sent from the Zend Framework mailing list archive at Nabble.com.