zend-form

Add some html to Zend Forms

心已入冬 提交于 2019-11-26 10:59:22
问题 Im looking for a simple bit of code that will let me add the following html into my zend form: <div id=\"wmd-button-bar\" class=\"wmd-panel\"></div> Thats it, it needs to be above my \'method\' element in the form but thats it. For such a simple action I cant find any methods that don\'t involve me learning rocket science (i.e Zend Decorators). 回答1: The only way I can think of at the moment is to add a dummy element to the form and remove all decorators except an 'HtmlTag' with the attributes

How do I use ViewScripts on Zend_Form File Elements?

帅比萌擦擦* 提交于 2019-11-26 09:27:36
问题 I am using this ViewScript for my standard form elements: <div class=\"field\" id=\"field_<?php echo $this->element->getId(); ?>\"> <?php if (0 < strlen($this->element->getLabel())) : ?> <?php echo $this->formLabel($this->element->getName(), $this->element->getLabel());?> <?php endif; ?> <span class=\"value\"><?php echo $this->{$this->element->helper}( $this->element->getName(), $this->element->getValue(), $this->element->getAttribs() ) ?></span> <?php if (0 < $this->element->getMessages()-