Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have written a new validation
Comment | File | Size | Author |
---|---|---|---|
webform_validation.validators.zip | 4.82 KB | lyknart |
Comments
Comment #1
svendecabooterCan you post this as a patch, and elaborate a bit more on what this does exactly? (e.g. provide a use case or example)
Comment #2
lyknart CreditAttribution: lyknart commentedThis solution can simply be, in the case of a multiple-choice, you can block the sending of the form until the user correctly answers the question or questions.
The method "specific values" can create an OR between the responses. In this case it is an AND.
I made a solution appears in the original attachment.
Exemple:
Question 1 :
1|A
2|B
3|C
Validation => 2 AND 3
If i answer :
1 = false
2 = false
3 = false
1 AND 2 = false
1 AND 3 = false
2 AND 3 = true => go to next question / send to webform
Comment #3
Liam MorlandPlease post this as a patch against the latest development version.
Comment #4
Liam Morland