zend-form-sub-form

How to validate >1 field at a time, in a Zend sub-form?

I've created a 3 screen "wizard" using the Zend_Form_SubForm example from the online reference documentation. The requirement I'm having trouble meeting is this: If fields 1, 2, & 3 of the first screen are already in the database, notify the user that they are trying to add a duplicate record. Each of those fields has their own validato...

Zend_Form using subforms getValues() problem

Hi all, I am building a form in Zend Framework 1.9 using subforms as well as Zend_JQuery being enabled on those forms. The form itself is fine and all the error checking etc is working as normal. But the issue I am having is that when I'm trying to retrieve the values in my controller, I'm receiving just the form entry for the last subf...

Zend Framework isValid problem with "belongsTo" option on elements.

I am building an application with a fairly hefty form that is built using 11 sub-forms (and I will mention that they are all ZendX_jQuery forms). In one of the sub-forms I have a few quirkier elements. I need a list of features about rooms in a house. So I require multiple text input boxes that belong to an array - these inputs are the...

Zend Framework Zend Zend_Form_SubForm Label

Hello Been looking for a while on how to sort this out. Essentially, I just need to set a label for a Zend Framework Sub Form. However I try to do this is just doesn't work. Zend Sub Form doesn't have a Label attribute so you can't seem to set it. However, when the form renders, you can clearly see a DT tag inwhich the label should ...

Zend_Form array notation and empty elements names

I'want to render: <input type="text" value="" name="foo[]" /> <input type="text" value="" name="bar[]" /> but Zend_Form_Element require a (string) name, so I need to do: $this->addElement('text', '1', array( 'belongsTo' => 'foo' )); $this->addElement('text', '2', array( 'belongsTo' => 'bar' )); but the output is: <input i...

How do configure Zend_Form to use array notation?

I'm having difficulty configuring Zend_Form. I have a Zend_Form sub-class. The form has some required information and some additional information. I want the additional information to be accessible via an array. The submitted data will look something like this: $formData['required1'] $formData['required2'] $formData['addiotnalData']['aD...

Problem retrieving values from Zend_Form_SubForms - no values returned

I have a Zend_Form that has 4 or more subforms. /** Code Snippet **/ $bigForm = new Zend_Form(); $littleForm1 = new Form_LittleForm1(); $littleForm1->setMethod('post'); $littleForm2 = new Form_LittleForm2(); $littleForm2->setMethod('post'); $bigForm->addSubForm($littleForm1,'littleForm1',0); $bigForm->...

Zend_Form : Adding fields in sub-forms on user's click

I'm having a zend form - comprised of a number of zend - sub forms, where the user is creating a new question (its a content management system). In one of the subforms, the user can click on a button to add more textfields, like this: [----------] [----------] [click to add more] which should give [----------] [----------] [---------...

Zend Framework problems using Element, sub-forms and belongsTo

Still pulling my hair out with Zend_Form and any elements that need to be placed in a sub-array. form->populate() does not work when working with elements within a sub-form that have been set to a parent array using belongsTo() - I think it is actually a bug in Zend_Form->setDefaults() but just wanted to see if anyone else has a) had the...

Setting decorators to Zend_Form_Element_Checkbox

I have a zend form comprised of 4 subforms. 1 of these subforms has 4 elements, and one of those elements is a zend_form_element_checkbox. I have 4 different display groups (1 for each subform) - one is : 'billing address', one is 'credit card info' , 'notifications' and 'misc' Assuming that 'notifications' is the part that has the chec...

How to set the id of an lement in Zend_Form manually?

Hello, I have an image element in my Zend_Form. $dropDownButton = new Zend_Form_Element_Image('image_button'); $dropDownButton->setOptions(array('image'=>'/images/image1.png', 'style'=>'padding-top:20px', ) ); $this->addElement($dropDownButt...

is it possible to create subform and displaygroup without fieldset on zend forms?

is it possible to create subform and displaygroup without fieldset on zend forms? ...

Zend Framework, Zend_Form_Element how to set custom name?

Hello, I have form, where some fields are looks like rows, so I can add/delete them using JS. For example: Field with ID=1 (existing row) <input id="id[1]" type="text" name="id[1]" value="1" /> <input id="name[1]" type="text" name="name[1]" value="100" /> Field with ID=2 (existing row) <input id="name[2]" type="text" name="name[2]...

Zend_Form_SubForm flattening array notation with getValues()

I am working with a series of forms that have subforms embedded into them and I am trying to work out if I can make getValues return the values without the array notation on the subform. ie: $form = new Zend_Form(); $subForm = new Zend_Form_SubForm(); $form->addSubForm( $subForm, 'contact' ); $form->addElement(new Zend_Form_Element_Te...

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()] ...

Display data in table on a subform

Hi all, I've got a question regarding sub forms. Currently I've got 2 sub forms and one parent form. On one of the sub forms I want to get data from the model and this needs to be displayed in a table, the first column needs to have a radio button as I want to know which row has been selected. But as a table isn't a form element how ca...