You are here

function webform_image_select_form_config_translation_add_form_alter in Webform 8.5

Implements hook_form_FORM_ID_alter() for config translate add form.

File

modules/webform_image_select/webform_image_select.module, line 65
Provides a webform element for a selecting an image.

Code

function webform_image_select_form_config_translation_add_form_alter(&$form, FormStateInterface $form_state, $is_new = TRUE) {

  // Manually apply YAML editor to text field that store YAML data.
  // @see webform_form_config_translation_add_form_alter()
  // @see _webform_form_config_translate_add_form_alter_yaml_element()
  foreach ($form['config_names'] as $config_name => &$config_element) {
    if (strpos($config_name, 'webform_image_select.webform_image_select_images.') === 0) {
      _webform_form_config_translate_add_form_alter_yaml_element($config_element['images']);
    }
  }
}