You are here

function hook_webform_element_input_masks_alter in Webform 8.5

Same name and namespace in other branches
  1. 6.x webform.api.php \hook_webform_element_input_masks_alter()

Return information about input masks for text based webform elements.

Parameters

array $input_masks: An array of input masks for text based webform elements.

See also

\Drupal\webform\Plugin\WebformElement\TextBase::getInputMasks

1 function implements hook_webform_element_input_masks_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

webform_test_element_input_masks_webform_element_input_masks_alter in tests/modules/webform_test_element_input_masks/webform_test_element_input_masks.module
Implements hook_webform_element_input_masks_alter().
1 invocation of hook_webform_element_input_masks_alter()
TextBase::getInputMasks in src/Plugin/WebformElement/TextBase.php
Get input masks.

File

./webform.api.php, line 300
Hooks related to Webform module.

Code

function hook_webform_element_input_masks_alter(array &$input_masks) {
  $input_masks["'alias': 'date'"] = [
    'title' => t('My Custom Date'),
    'example' => '01/01/2000',
    'mask' => 'dd/mm/yyyy',
  ];
}