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.
form_builder_webform_form_builder_properties() calls a seemingly webform component specific hook while gathering properties. This is rather confusing:
- The list of properties in form_builder is generated per form_type.
- Properties are enabled per element_type.
- This hook is called per webform component type but has effects for all components. -- all other _webform_HOOK_COMPONENT()-functions have only effects for their specific component-type.
I suggest to remove this hook as long as there is no way to modify properties specific for a component.
Comments
Comment #1
quicksketchThis hook is used for a few things that are webform-specific though:
- Grid options and questions.
- Webform "unique" property.
You'll notice that hook_form_builder_properties() takes an argument for the $form_type, so these properties only exist when editing Webform forms.
There's a good chance that this hook has some of the problems you describe, but considering we're currently using it for functionality, we can't simply remove it.
Comment #2
torotil CreditAttribution: torotil commentedIt is true that the properties are only per form_type. But still they are not per component. I'm adjusting the summary.
Comment #3
torotil CreditAttribution: torotil commentedI'm unsure whether this is something that we should change in 7.x-1.x.