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 answers
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 REGISTRATION
- When transferring mri t1 to mni152 spaces, the dimensions change and lose information, is that not a problem?
- how to connect registration form in the database in ms access vb.net
- Problem with login and register function i session Flask
- Issue with Registration: User Data Not Saving to Database (Django)
- Meta for developers - Verification code too short
- Encountering 404 Error When Posting Registration Data to Server Endpoint in React Application
- How do I have PBI filter out registration records that occur prior to any time gap of two years or more?
- How 'torch.nn.Functional.grid_sample' module actually works in the case of 2D gray scale image?
- Move "I am vendor" and "I am customer" at the top of the form before other fields in Dokan
- Django Rest Framework New User Registration with Admin activation
- Azure STT is giving error HttpResponseProxy{HTTP/1.1 400 Bad Request
- Save selected country from countries dropdown in WooCommerce registration
- Laravel login and redirect after registration fails
- Keycloak 21 Custom Registration Error: Expired Code
- Laravel - How to pass arguments to function in route controlller?
Related Questions in ZEND-FORM-ELEMENT
- How to add 'sub elements' in Zend Form
- Codeigniter file upload from a form without ajax/jquery/javascript
- Zend Framework 3 - Add and Remove new input element section using javascript
- Zend setData method prevents Collection::setCount working
- How to show date in one format, but store it in another?
- Incorporate custom validation error messages into form object by element
- extend functionality of Zend_Form_Element
- Zf2 - I am not able to define the form as shared one using its name as well as alias
- How to add zend form element at specific position?
- How to not escape html entities in a submit button value?
- How to get the selected option of a radion button element in Zend Framework 2?
- How to set the type of an element in a Fieldset child class in Zend Framework 2?
- How to set class for the radio buttons set's container in a ZF2 Form?
- What is the correct way to add validation on the form level in ZF2?
- How to make a field validation dependent on another field usind array form setup in ZF2?
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?
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)
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.