Skip to content

Commit

Permalink
Make prefix_display and suffix_display attributes optional for ev…
Browse files Browse the repository at this point in the history
…ent form fields with prefix/suffix
  • Loading branch information
jensschuppe committed Jun 6, 2024
1 parent 590fef2 commit 446d013
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/civiremote_event/src/Form/RegisterForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public function addConfirmDependencies($field, $field_name, &$group) {
public function addPrefixSuffix($field, $field_name, &$group) {
if (!empty($field['prefix'])) {
$group[$field_name]['#prefix'] = '<div class="form-element-prefix">';
if ($field['prefix_display'] == 'dialog') {
if (isset($field['prefix_display']) && $field['prefix_display'] == 'dialog') {
$html_id = Html::getUniqueId('dialog-' . $field_name . '-prefix');
$group[$field_name]['#prefix'] .=
'<div
Expand All @@ -260,7 +260,7 @@ class="dialog-wrapper"
}
if (!empty($field['suffix'])) {
$group[$field_name]['#suffix'] = '<div class="form-element-suffix">';
if ($field['suffix_display'] == 'dialog') {
if (isset($field['suffix_display']) && $field['suffix_display'] == 'dialog') {
$html_id = Html::getUniqueId('dialog-' . $field_name . '-suffix');
$group[$field_name]['#suffix'] .=
'<div
Expand Down

0 comments on commit 446d013

Please sign in to comment.