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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Liam Morland’s picture

Thanks for the suggestion. I like this idea.

JKingsnorth’s picture

Status: Active » Needs work
FileSize
1.07 KB

I'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.

Liam Morland’s picture

That 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.