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.
By jrockowitz on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x-5.x
Introduced in version:
8.x-5.9-beta1
Issue links:
Description:
To make it easier to alter an element's configuration form, hook_webform_element_configuration_form_alter()
was added. This hook can be used to alter the element edit form before it is populated to add custom properties or tweak existing properties.
To better demonstrate the use-case for hook_webform_element_configuration_form_alter()
, the webform_example_element_properties.module was added, which shows how to easily add a custom property to all webform elements.
Impacts:
Module developers
Comments
Usage of This
Good day,
How or where can I find documentation on syntax of using this. I am planning to set a value of an existing textfield element from a function which is getting the value from an external SOAP. I have 2 fields, User enters an company number on the first field then the company name is retrieved from the SOAP and assigned to the second field. I am able to do this using custom form but i would like to use Webform 8 as it offers me more possibilities. Can only go as far as this: function supplier_webform_element_configuration_form_alter(&$form, FormStateInterface $form_state) {}
I wish to then use AJAX within this module to call the SOAP function
I will really appreciate assistance on this