<?php
//form element
class EntStudio_Form_Element_Separator extends Zend_Form_Element_Xhtml {
public $helper = 'FormSeparator';
public function init() {
$this->removeDecorator("HtmlTag");
$this->removeDecorator("Label");
$this->removeDecorator("Description");
$this->setDecorators(array(
array('ViewHelper'),
));
}
}
//helper class
class EntStudio_View_Helper_FormSeparator {
public function FormSeparator($name, $value = null, $attribs = null) {
$sClass = "clear";
$sClass .= ! empty($attribs["class"]) ? " " . $this->escape($attribs["class"]): "";
$xhtml = "<div class='" . $sClass . "'></div>";
return $xhtml;
}
}
/**
to use:
$this->addElement("separator", "sep1", array(
"ignore" => true
));
this creates:
<div class="clear"></div>
//makesure to add your own class .clear { clear:both; }
**/