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

19 lines
781 B
PHTML

<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>