0

I need to store sets of conditions on the webform field level (these would then be evaluated according to the field's submitted values within a custom submit callback).

I would like these conditions to be editable on the webform field level just like #states conditions that honour the field type for value ranges, set values, boolean etc:

enter image description here

No new custom state is necessarily needed here as this new type of condition would not be related to interacting fields. I'm merely looking for a way to expand webforms and add a custom field to each element that will allow adding (on the UI) sets of conditions based on its value(s). These sets would be part of the field's properties and accessible in a validation / submit callback.

1 Answer 1

0

There's a hook for that: hook_webform_element_configuration_form_alter(), webform_example_element_properties.module provides a simple example too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.