Hi folks,

when a part of the form is submitted via ajax, like file upload, the main behavior is lunching all rules of the form. The problem is that some events are yet tiggered on page load and crashes on the rebind. Also, the context passed to the behavior is all form so is not possible to only rebind elements changed via ajax.

I contribute a patch with an extra check of the update to be sure that some element is really changed and avoid the rebind of the form if not needed.

I would like to know your feedback!

Thank you for your work!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quiron created an issue. See original summary.

quiron’s picture

flink-ricardo’s picture

Status: Active » Reviewed & tested by the community

I can confirm, that this issue is still active:
Steps to reproduce:
1. Clean install
2. (in my case i made use of webforms) enable webform
3. enable clientside_validation, clientside_validation_webform
4. create a form with an upload field, and a required checkbox
5. Succes: go to the webform and press submit without uploading anything, the clientside validation will trigger
6. Fail: go to the webform select a file press upload, press submit, the clientside validation will NOT trigger

#2 tested and fixes the current issue.

SantVim’s picture

FileSize
69.84 KB

Happens to me in Manual crop,
1. Image field with crop option in user register form.
2. Add image and crop.
3. Submit the form and validation is triggered if there are errors.
4. Fix the errors and click on submit works good.
5. But if I Click on remove image, the form submits and a welcome message is sent to user. This keeps on repeating till the submit button is clicked.
6. If the user submits the form the mail is sent again.

The patch doesn't fix it. Is this issue related or should i open a new one.

Seems another module was creating the issue. Uninstalling helped solve my issue.

SantVim’s picture

nikunjkotecha’s picture

Status: Reviewed & tested by the community » Closed (outdated)

Closing as outdated as per #4. Also the fact that we are moving more focus on 8.x and 9.x

Please re-open if really required.