zend-decorators

Setting the inner html text of a < span > element using Zend_Form_Decorators

I'm trying to set the inner html of the < span > tag here , so it looks like: Group this is what i have so far: $form->addDisplayGroup( array( ................ ), 'maingroup1', array( 'legend'=>'', 'disa...

Zend_Form Decorations Issue with Description and Errors

Hi all. I've spend all the day trying to set the Zend_Form decorators for the following format: <dt> <label for="square_meters">The label</label> </dt> <dd> <input type="text" name="square_meters" id="square_meters" /> <div class="description-div">m2</div> </dd> I got it. Currently this is working with the following array: $des...

Zend Decorators - Remove Id Field for DT Wrapper

Hey, I got two forms and they share some ids as two input fields are called 'title'. Zend generates me a nice output like this: <dl class="zend-form"> <dt id="title-label"> <label for="form1-title" class="required">Description</label> </dt> <dd id="title-element"> <input name="form1[title]" id="form1-title" value="..." t...

Zend Framework: How to remove the DtDd Decorator on a Zend_Form_Element_File?

I've tried every thing I can think of and I can't figure out how to display only the ViewHelper decorator on a Zend_Form_Element_File. $UserPhoto = new Zend_Form_Element_File('UserPhoto'); $UserPhoto->setDestination(TMP_DIR); $UserPhoto->addValidator('Count', false, 1); $UserPhoto->addValidator('Size', false, 10240000); // 10 mb max $th...

Zend_Form loadDefaultDecorators don't apply to subforms

Hi all, Trying to set up a form partly using subforms that i also use elsewhere. I have setup the decorators to utilize UL-LI notation instead of the regular DtDd wrapper. Structure is something like this. RegisterForm + Element, firstname + Element, lastname + SubForm, NoScriptForm [new Olo_AddressApartmentForm()] ...

Help required regarding Zend_Form

Hi all, I wanted following output from Zend_Form please help <form ...> <div class="labels"><b>Name:</b></div> <input type="text" value="" name="name" class="whitelabelform"><br> <div class="labels"><b>Email:</b></div> <input type="text" value="" name="email" class="whitelabelform"><br> <div class="labels"><b>Security code:</b></div> <...

Appending or Prepending HTML Tags to Zend Form Element

For the purposes of styling I have the need to put an opening <div> at the beginning of one element, and a closing </div> tag at the end of another. Looking over the docs for HtmlDecorator I can't seem to figure out how to get it right, or if this is even the right decorator to use. It seems wasteful to have to create my own decorator si...

Can custom decorator access parts of $content

In a custom decorator, I'm wrapping the element content with a div. This code creates a div around both the <dt> label and the <dd> element public function render($content) { return '<div class="test">' . $content . '</div>'; } Is there a way I can further access those 2 parts, the dd and dt. Such as maybe wrap the div arou...

Are Zend Decorators rally helpfull? What problem it solves out except form validation

Hello, I have been using Zend decorators but it seems complex in case of page designs. If my designers want to make changes in any of the form and page they cant do that. It require some complex work if I want to use any third party library (like multi select check box) or a list of option with special effect. Can anybody knows wha...

How does one apply a class to a Zend Framework decorator on error?

Right now, I have Zend form elements wrapped in list-items. Form is validating or coughing up errors as it should. But I'd like to apply a class to the list-items of offending elements (but only to the list-items offending elements) on failed validation. Example: This field has valid input <li> <input type="text" name="address2" id...