Skip to content

Commit

Permalink
VACMS-12800: Resolves PHP warning about missing #type by selectively …
Browse files Browse the repository at this point in the history
…applying #states to group_q_a_page_components form elements. (#13177)

Co-authored-by: Daniel Sasser <[email protected]>
  • Loading branch information
dsasser and dsasser authored Apr 5, 2023
1 parent e383af0 commit c289fcf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docroot/modules/custom/va_gov_backend/va_gov_backend.module
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,9 @@ function va_gov_backend_form_alter(&$form, FormStateInterface $form_state, $form
*/
function va_gov_backend_field_group_form_process_build_alter(array &$form, FormStateInterface $form_state, &$element) {
// Toggle group Q&A component visibility.
$form['group_q_a_page_components']['#states']['visible']['input[data-drupal-selector="edit-field-standalone-page-value"]'] = ['checked' => TRUE];
if (!empty($form['group_q_a_page_components'])) {
$form['group_q_a_page_components']['#states']['visible']['input[data-drupal-selector="edit-field-standalone-page-value"]'] = ['checked' => TRUE];
}
}

/**
Expand Down

0 comments on commit c289fcf

Please sign in to comment.