function hook_field_group_form_process_build_alter in Field Group 8.3
Alter the form after all groups are processed.
Parameters
array $element: The element being processed.
\Drupal\Core\Form\FormStateInterface $form_state: The form state
$complete_form: The complete form.
1 function implements hook_field_group_form_process_build_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
File
- ./
field_group.api.php, line 123 - Hooks for the field_group module.
Code
function hook_field_group_form_process_build_alter(array &$element, FormStateInterface $form_state, &$complete_form) {
$element['group_example']['#states'] = [
'visible' => [
':input[name="field_are_you_ok"]' => [
'value' => 'yes',
],
],
];
}