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

quicksketch’s picture

This hook is used for a few things that are webform-specific though:

- Grid options and questions.
- Webform "unique" property.

The list of properties in form_builder is global.

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.

torotil’s picture

Issue summary: View changes

It is true that the properties are only per form_type. But still they are not per component. I'm adjusting the summary.

torotil’s picture

Status: Active » Postponed

I'm unsure whether this is something that we should change in 7.x-1.x.