function yamlform_yamlform_options_range_alter in YAML Form 8
Implements hook_yamlform_options_YAMLFORM_OPTIONS_ID_alter().
See also
config/install/yamlform.yamlform.example_options.yml
File
- includes/
yamlform.options.inc, line 17 - Options alter hooks.
Code
function yamlform_yamlform_options_range_alter(array &$options, array $element = []) {
$element += [
'#min' => 1,
'#max' => 100,
'#step' => 1,
'#pad_length' => NULL,
'#pad_str' => 0,
];
$options = YamlFormOptionsHelper::range($element['#min'], $element['#max'], $element['#step'], $element['#pad_length'], $element['#pad_str']);
}