In my drupal6 site I have wizard form. I implemented it with FormAPI using form storage and the rebuild property. My form validation is being done with the #required property and with functions in the #element_validate property. It's working fine but for one thing, when I click on the previous button the form is being validated and I don't want it to. Is there a smart and right way to disable the validations when a specific button of the form is clicked?
Drupal wizard form: Validation and previous button
1.6k views Asked by Luiz Guilherme At
3
There are 3 answers
0
aterchin
On
Kevin's answer works. You could also try http://drupal.org/project/skip_validation where you would add an additional property to your previous button,'#skip_validation' => TRUE
Related Questions in PHP
- How to add the dynamic new rows from my registration form in my database?
- Issue in payment form gateway
- How to create a facet for WP gridbuilder that displays both parent and child custom fields?
- Function in anonymous Laravel Blade component
- How to change woocomerce or full wordpress currency with value from USD to AUD
- General questions about creating a custom theme Moodle CMS
- How to add logging to an abstract class in php
- error 500 on IIS FastCGI but no clue despite multiple error loggings activated
- Composer installation fails and reverts ./composer.json and ./composer.lock to original content
- How to isolate PHP apps from each other on a local machine(Windows or Linux)?
- Laravel: Using belongsToMany relationship with MongoDB
- window.location.href redirects but is causing problems on the webpage
- Key provided is shorter than 256 bits, only 64 bits provided
- Laravel's whereBetween method not working with two timestamps
- Implementing UUID as primary key in Laravel intermediate table
Related Questions in DRUPAL
- Drupal image styles DivisionByZeroError
- Drupal: MQLSTATE[42000]: Syntax error or access violation: 1142 INSERT command denied to user when accessing any page with a form
- How can I add taxonomy to uploaded files through an api in Drupal 10
- How to retrieve taxonomy term name in url instead of id in a drupal view?
- Save button not displaying in drupal 9
- how to do ajax callback in custom block, which will fetch records from database dynamically in Drupal 10?
- Why are my form fields, built using Drupal Next.js Webforms, not displaying the Help Text?
- Multiple replacement / substitute NGgram string SOLR 8.6
- Drupal 9 Bartik (default theme) carried over from old Drupal seems to have previously worked but no longer renders HTML properly
- Getting no State error with simplesamlphp library v 2.13
- Using the Drupal Cache API for Drupal Entity Caching
- drupal version issue drupal 8 to drupal 10
- Why does my pure CSS parallax scrolling stop working on completion of page loading in Drupal 9
- Getting the value from a multi-select list PHP in Drupal site
- Parent menu link opens children when clicked, instead of going to link (Drupal)
Related Questions in DRUPAL-6
- Condtional Timeout Configuration on Centos7 to avoid Gateway Timeout Error
- How to remove or disable " Subject " In Comments Field in Drupal 10
- %20 in URL is now causing ERROR 403 FORBIDDEN Errors
- x264 [error]: baseline profile doesn't support 4:2:2 ,with ffmpeg php
- Drupal 6 and GlobalPayments HPP Integration
- Make img embed script work with drupal ajax
- Docker container cannot connect to the host machine database
- Docker container can't connect to the host machine database
- drupal 6 site setup in local it's redirecting to production site
- How to iterate this.value in javascript
- data in body not getting passed while consuming rest post web service in my custom drupal module
- Need answer for drupal question for upwork test
- Drupal 6 with latest version php
- Drupal form design without using associative arrays
- Drupal 6 site re-indexing not happening
Related Questions in DRUPAL-FAPI
- Drupal 7 date_popup form element wrong value submitted
- Disable Arrows on input type="number" without javascript
- How to create an image button that behaves like a button in drupal 7?
- Drupal FAPI: How do I change a value in the validation function?
- Drupal 7 user registration custom
- Drupal 7 contact us form custom module
- How to dynamically remove field in Drupal 7 custom form using AJAX
- In Drupal after selecting a value in an autocomplet, I need to load field values from a database record
- How can I set ID attribute for drupal 7 form elements?
- Apply custom page template to content from Drupal 7 module
- Drupal 7 Form API Theming #autocomplete textbox with long text
- Drupal 7, default_value for a file field in a custom form
- Drupal 7 -- #AJAX Refresh not displaying drupal_set_message errors
- how to override a web form submit function in drupal7?
- Run JavaScript on form submit in Drupal 7
Related Questions in DRUPAL-FORM-VALIDATION
- How to validate max post size on custom form
- Stumped on Drupal 7 - adding user_profile_form #validation callback via hook_form_alter
- Trigger on form field when there is change in other form field angular5 form validation
- How to create an entity reference field which will allow unlimited values in a configuration form?
- Check if form failed validation
- Caching product display with Display Cache and still be able to add products
- How to disable HTML 5 client side form validation for Java
- how to show drupal message “field is required” from webform validation in drupal 7
- Run checks on drupal_goto function
- drupal_validate_form not validating more than one time on listing page
- Drupal validation solution when using file upload with other required form field
- Switch off JavaScript validation
- Drupal wizard form: Validation and previous button
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?
Popular Tags
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)
The only way to do this cleanly (unfortunately) is to avoid the use of #required = TRUE and validate it yourself in a validation handler, taking into account knowledge of what 'step' the form is on in the wizard process.
One common approach is to accumulate all of your in-progress data in $form_state['storage'], where it will persist between rebuilds.