Skip to content

Commit

Permalink
Fix value retrieval for fields with names differing from their defini…
Browse files Browse the repository at this point in the history
…tion key
  • Loading branch information
jensschuppe committed Jul 15, 2024
1 parent 590fef2 commit 1b277b0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/civiremote_event/src/Form/RegisterForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -817,11 +817,12 @@ protected function buildConfirmForm(array $form, FormStateInterface $form_state)
$group = &NestedArray::getValue($form, $group_parents);

// Build the field.
$value = $form_state->getValue($field['name']);
$value = $form_state->getValue($field_name);
$type = EventUtils::fieldType($field, 'confirm');

// Unset $value when the value does not belong to the field.
if ($field_name != $field['name'] && $value != $field_name) {
// Unset $value when the value does not belong to the field. This will
// hide unselected radio buttons.
if ($field['type'] === 'radio' && $field_name != $field['name'] && $value != $field_name) {
$value = NULL;
}

Expand Down

0 comments on commit 1b277b0

Please sign in to comment.