I have working user registration form. It consist of Zend Form Elements. Now I wonder what is the best way to modify this form in order to implement a "switch" in registration form. In other words user should be able to choose which fields to fill (there should be fields as for individual user and company; only few elements should change their labels and "required" state of a selected registration type) and accordingly of made choice validate appropriate fields. So which is the best and not hard way to make it? Maybe there are some tutorial or examples? Thank you!
Make a "switch" in Zend Form to show/hide specific form elements
1.2k Views Asked by Kuzma At
1
There are 1 best solutions below
Related Questions in ZEND-FRAMEWORK
- Fatal error: Uncaught exception 'Zend_Acl_Role_Registry_Exception' with message 'Role 'admin' not found
- Uninstalling php 5.3 in ubuntu 14.04
- zend soap server reading xml attributes
- Failed installation of zend-escaper with Composer
- Composer cannot find Git windows 8
- Can/How does one make Zend's default (or any other autoloader on the stack) ignore a class?
- Zend Framework Active Directory authentication
- Zend: 500 error instead of 404
- How to force Zend_Navigation_Page_Mvc to generate an href
- Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 3 bytes) in E:\library\Zend\Db\Adapter\Pdo\Abstract.php on line 144
- Zend Gdata - missing HeaderValue.php
- Cookies on Zend Framework 2
- Fatal error: Class 'Zend_Pdf_Color_RGB' not found app/code/core/Mage/Sales/Model/Order/Pdf/Shipment.php magento using zend library
- CORS - request made after preflight request expects 'Access-Control-Allow-Credentials' to be true
- Why is this form invalid all the time
Related Questions in ZEND-FORM
- ZF2 form with fieldset and doctrine not working
- zf2 form collection hydration gets wrong $data in hydrator
- Zend 1 to Zend 2, was using decorators, how can i achieve the same behavior now?
- Zend Form: Call to a member function setValue() on a non-object
- Zend Form can't validate float number
- Adding custom attributes in Zend Framework 2 using the Zend Form
- How to get new uploaded file name in controller?
- How can I process an unlimited amount of elements using Zend Form
- Zend routing issue on legacy code
- How can I replace the File decorator?
- How to always show single validation message in ZF2 validators?
- How to pass options to collection fieldset in form created by form manager?
- Checkbox in Zend Form
- Zend Form old password verification
- Unable to delete a record through Zend_Db_Table_Abstract->delete()
Related Questions in REGISTRATION
- setKeepAliveTimeout is deprecated in iOS9
- data not inserted into 1 sql so couldn't login, registration worked but table not updated
- How to register an installation remotely?
- Check if the user is activate or not
- Insert into mysql database through php
- Windows 8.1 phone is not being registered
- Devise prevent auto sign-in after registration
- Email is already in database, returns as if it isn't
- Checking for 'isUniqueUsername' in cakephp doesn't seem to work?
- PHP - MySQL - Sign Up Trouble [blank data]
- creating a registration profile in python django
- EF Code-first MVC: Should I add fields to the default AspNetUsers table or create another 'UserInfo' table that relates to the AspNetUsers table?
- Launch Screen for first time user experience doesn't look right (iOS)
- Extension or any method to override the registration module in magento 1.9
- Redirect after register in Laravel
Related Questions in ZEND-FORM-ELEMENT
- Zend Form can't validate float number
- How to implement Dependent drop down zend framework 1.12 form using ajax and JQuery
- ZF2 passing 0 to a required formfield
- How do I allow html tags in label for Zend form element using addElement()?
- Incorporate custom validation error messages into form object by element
- Make a "switch" in Zend Form to show/hide specific form elements
- Zend Form Radio jQuery buttons
- Zend Form Element Label "for" Attribute
- Custom Error Message for Captcha Element In Zend Framework 1.10
- How to render some html in Zend form?
- Customize zend_form Captcha output?
- Zend framework decorators question
- how to set max character limit for textarea in zend like 300 characters
- Setting a Zend_Form_Element_Text as not required?
- Zend specific custom error message for multiple errors
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 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?
I think that the best place to change required" states and validators of your form elements is just before validating your form, i.e.
$yourForm->isValid($_POST). In this place you would have to change the validators and/or required states of some fields. Which fields would depend on the value of registration type input form element.As far as showing/hiding specific form elements goes, you could do it on the front-end side using JavaScript.