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.
Similar to: http://drupal.org/node/980154 it would be great if most validation that can be performed against a textfield could be done against a hidden field.
I have hacked the code for example to do numeric validation. We use this on some forms where we email out a link, and there is a GET parameter that is set to a hidden field (using %get[key] as the default value of the hidden field).
Maybe I'm doing it the wrong way, however if not it would be great to add "hidden" to the supported types for most of the validators. (So we don't have to patch for every release).
Comments
Comment #1
hendrakieran CreditAttribution: hendrakieran commentedHi there,
Can you share your hack here? I need to exactly the same thing!
Comment #2
svendecabooterYou can use hook_webform_validation_validators() to change the default settings, so you don't have to hack the module.
However you make a good point, so I have added the "hidden" component to validation rules that could most likely benefit from it.