I'm working on a model using Zend Form. I have a subform called $product_item. I would like to add multiple instances of it to another subform called $items. How would I go about doing that? I'm not finding the Zend reference guide particularly helpful.
subform within a subform
1.5k Views Asked by liz At
1
There are 1 best solutions below
Related Questions in ZEND-FRAMEWORK
- How to properly quote / escape this INSERT statement in Zend 1 Framework
- Zend Barcode label distance ajustment
- cast in doctrine query builder
- Laminas $filter->getValues() in getData() of laminas-form return duplicate of array collection when using Element File
- I want to translate country name to english in using diffrent country locale Magento2?
- How to get the name of the module, controller and action in Laminas framework?
- Zend XmlRpc Client gzinflate out of memory on php 7.1
- Zend Barcode image isn't generate correctly in CodeIgniter
- How to switch between the read-only and read-write db conenctions in Laminas using DBAL
- Database transaction is not working as expected even rollback is not working
- Ajax call in Zend 1.12 return 404
- Zend Framework 1 legacy application redesign
- Zend Barcode image do not generate correcly
- How to click the button after displaying the dialog box in jquery
- Zend Session Error, Session must be started before any output has been sent to browser
Related Questions in ZEND-FORM
- Zend Session Error, Session must be started before any output has been sent to browser
- How to use OptionalInputFilter and ways to validate it
- How can I use javascript form validation alongside ZF1 form validation?
- Laminas / Zf3 - Accessing form parameters from Fieldset
- This result is a forward only result set, calling rewind() after moving forward is not supported
- PHPUnit testing a Laminas form with custom validator with dependencies
- Keep old value of a select field in a form - Zend Framework 2
- Populate Multi select drop drop down zend 3
- Zend 1 radio option as image
- How to add an error message based on two field values using Zend_Validate_Db_NoRecordExists
- Problem with binding an object in the form with Zend Framework
- how to remove fields from form class and view
- Try to change database name in zend
- How to fix 'The input was not found in the haystack' in ZF2?
- Zend framework 3 form issue with binding entities that use return type hinting
Related Questions in ZEND-FORM-SUB-FORM
- PHP Zend Subform - view script decorator on subform element
- How to populate zend form data of multi array input fields
- Validate form but not subform
- Zend_Form: Wrap html tags around subforms
- Dynamic forms using Zend Form
- ZF2 rendering subforms in fieldset
- Zend Form, can't take input values if there's a default value in element
- Class 'Zend_Form_Subform' not found
- Zend Form with Subforms causing the submit button to stop working
- How to populate multi array in zend form
- How to generate subform of form - Zend Framework
- Zend Subform tutorial displaying forms in unaccurate order
- subform within a subform
- Splitting up a Zend_Form
- ZF: Zend_Form_SubForm display elements in the View on one's own using only FormElements and ViewHelper?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can just add sub-forms to sub-forms:-
On submission the subform values will be available in arrays in the
$_POSTarray.$value=$_POST['sub1']['sub2']['name']for example.http://framework.zend.com/manual/en/zend.form.forms.html#zend.form.forms.subforms
To print or access elements in sub forms you have several options:-
If
$subForm1has an element declared thus:-Then the
emailfield can be rendered in the view like this:-Remember that the elements are referenced by their names not by the variables you use to declare them.
Also, remember that
$this->elementis referencing an instance ofZend_Formso you have all of those methods available. That means you can do this:-