function webform_bootstrap_preprocess_webform_actions in Webform 8.5
Same name and namespace in other branches
- 6.x modules/webform_bootstrap/tests/modules/webform_bootstrap_test_module/webform_bootstrap_test_module.inc \webform_bootstrap_preprocess_webform_actions()
Implements hook_preprocess_webform_actions().
See also
template_preprocess_webform_actions()
File
- modules/
webform_bootstrap/ tests/ modules/ webform_bootstrap_test_module/ webform_bootstrap_test_module.inc, line 72 - Alter hooks to increase webform input and button size.
Code
function webform_bootstrap_preprocess_webform_actions(array &$variables) {
// Add .btn-lg to all 'submit' button in $variables.
foreach (Element::children($variables['element']) as $key) {
$variables['element'][$key]['#attributes']['class'][] = 'btn-lg';
$variables['element'][$key]['#attributes']['style'] = 'margin: 24px 0 0 0';
$variables[$key]['#attributes']['class'][] = 'btn-lg';
$variables[$key]['#attributes']['#attributes']['style'] = 'margin: 24px 0 0 0';
}
}