Zend Framework: How do I modify/format the form view generated with Zend_Dojo_Form elements
Posted
by pinardelrio
on Stack Overflow
See other posts from Stack Overflow
or by pinardelrio
Published on 2010-06-17T04:46:33Z
Indexed on
2010/06/17
4:53 UTC
Read the original article
Hit count: 180
zend-framework
I have created a form:
<?php
class Application_Form_Issue extends Zend_Dojo_Form
{
public function init()
{
$this->setName('issue');
$this->setMethod('post');
$id = new Zend_Form_Element_Hidden('id');
$id->addFilter('Int');
$date_recvd = new Zend_Dojo_Form_Element_DateTextBox('date_recvd');
$date_recvd->setLabel('Date Received')
//->setRequired(true)
/*->addValidator('NotEmpty'); */;
More Form elements ...
To view this form my view script is:
<?php echo $this->form; ?>
This all works just fine, with fully functional dojo form elements (datepicker, timepicker, etc) and successfully saving the data.
However, now, I want to format the form that is generated with css. Such as grouping some elements and floating left or right, making some input text fields wider/narrower, etc. How?
I realize I can modify the view script but it seems like that defeats the purpose of using Zend_Dojo_Form or Zend_Form. Is that a correct assumption?
© Stack Overflow or respective owner