#1084760: Conditional grids with mandatory settings are not respecting conditional context

Update: this is probably more related to the webform clientside_validation addon module, though there is likely still a problem in this module too.

To workaround on the client side, use the jquery_update module and switch to jquery 1.4.4 or higher (did not test with older). Thin in clientside_validation.js, change the following around line 45:

self.validators[f] = $('#' + f).validate({
ignore: ':hidden',
errorClass: 'error',
errorContainer: '#' + errorel,
errorLabelContainer: '#' + errorel + ' ul',
wrapper: 'li'
});

The reason you need the jquery update is the :hidden selector in newer versions will match invisible elements as well as input type hidden elements, and thus not run the validator on anything that is not present on the screen.

However, the backend still returns an error on submit.

Comments

Jelle_S’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Active » Postponed
Jelle_S’s picture

Status: Postponed » Needs review

Testing revealed our module does it "the right way", meaning hidden required fields are not validated after submission. However, the server-side validation of webform conditional does not let this pass. Is this a bug or does it work by design?

Jelle_S’s picture

Status: Needs review » Fixed

Marking as fixed, feature added in 7.x-1.16

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.