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.
Summary
It is not immediately obvious from the 'form components' screen which fields have validation rules applied.
Proposed solution
Add a column to the form components screen called 'Validation' with a simple 'tick' if a validation rule is applied to that component.
Comment | File | Size | Author |
---|---|---|---|
#2 | webform_validation_component_column.txt | 1.07 KB | JKingsnorth |
Comments
Comment #1
Liam MorlandThanks for the suggestion. I like this idea.
Comment #2
JKingsnorth CreditAttribution: JKingsnorth commentedI've done some work on this. The logic seems OK, but I'm struggling to get the new column into the webform_component_fom table! I'm not sure how to override or add to the theme function that is building it.
The attached function can be added to the bottom of webform_validation.module to test. (Please ignore coding standards issues for now, sorry!)
theme_webform_components_form() is on line 157 of webform/webform.components.inc...
I'd appreciate some guidance or a pointer in the right direction if someone could assist. Then I'd be happy to finish it off as a patch.
Comment #3
Liam MorlandThat code is all in the webform module. I think it is using Views for that page. There should be hooks you can use to override it.