Closed (outdated)
Project:
Clientside Validation
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 Aug 2012 at 18:45 UTC
Updated:
8 Dec 2016 at 19:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jelle_sThe only workaround for now is to add the class cancel to that button in a hook_form_alter() until the pull request mentioned in #1707032: Make Client side validation not respond to certain input elements like Cancel button with classes other than "cancel". is committed.
Comment #2
attiks commentedComment #3
roam2345 commentedThis is not a duplicate as in this case these options are on ajax form elements that are not wired to the submit button on the page, they are toggle options in the payment form. The patch being worked on in issue http://drupal.org/node/1707032 is close to what is needed here how ever it would also need to work on "blur" as to not validate the form element chosen in this case being the payment options.
As an example, I have added the class "cancel" to the option fields in the commerce checkout page (as described in issue http://drupal.org/node/1707032) via the hook_form_FORM_ID_alter() this does not stop the other fields on the form from validation or alter the form changing fields for those of the new payment option when I toggle the payment option on the check out form.
Comment #4
attiks commentedThis will be hard to support out of the box, we have no idea if the blur is going to submit a form. I had a quick look and they are using Drupal AJAX to bind to the radio elements (without javascript the checkout will probably not work 100%) and Drupal AJAX does a post of the complete form (using form.submit) so it will get validated.
As a workaround you might implement Drupal.ajax.prototype.beforeSubmit to disable the validator.
Comment #4.0
attiks commentedadded more descriptions and fixed typo
Comment #5
joelpittetON 2.x and 1.x I'm getting similar with the payment busting the submit button and not reactivating it. Maybe a separate issue?
Comment #6
aaronbauman@Joelpittet:
1. this issue is resolved by the still-sandbox module https://www.drupal.org/sandbox/cityreader/2545780
2. your report should go in a new issue
Comment #7
joelpittetThank you @aaronbauman, I've moved it to #2834118: Commerce Payment option change