westdc-zf1/application/default/views/scripts/form_element.phtml

19 lines
781 B
PHTML
Raw Normal View History

2013-04-08 08:43:11 +00:00
<div class="<?= $this->class ?>">
<label class="control-label" name="<?= $this->element->getName() ?>"><?= $this->element->getLabel() ?></label>
<div class="controls">
<?php
switch ($this->element->helper) {
case 'formText':
echo $this->{$this->element->helper}($this->element->getName(),$this->element->getValue(),$this->element->getAttribs());
break;
case "formSelect":
$att = $this->element->getAttribs();
echo $this->{$this->element->helper}($this->element->getName(),$this->element->getValue(),$this->element->getAttribs(),$att['options']);
break;
default:
echo $this->{$this->element->helper}($this->element->getName(),$this->element->getValue(),$this->element->getAttribs());
break;
}
?>
</div>
</div>