From 17e512e4a7531d7905165e8cc082dd6df2eba2c2 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Wed, 15 Feb 2023 16:43:58 +1100 Subject: [PATCH] dev/core#4119 Only generate error on blank confirm_title if confirmation page is enabled or the event is monetary --- CRM/Event/Form/ManageEvent/Registration.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Event/Form/ManageEvent/Registration.php b/CRM/Event/Form/ManageEvent/Registration.php index babb08cc9f..4a76047396 100644 --- a/CRM/Event/Form/ManageEvent/Registration.php +++ b/CRM/Event/Form/ManageEvent/Registration.php @@ -444,7 +444,8 @@ class CRM_Event_Form_ManageEvent_Registration extends CRM_Event_Form_ManageEvent if (($values['registration_link_text'] ?? '') === '') { $errorMsg['registration_link_text'] = ts('Please enter Registration Link Text'); } - if (($values['confirm_title'] ?? '') === '') { + // Check if the confirm text is set if we have enabled the confirmation page or page is monetary which forces the confirm page. + if (($values['confirm_title'] ?? '') === '' && (!empty($values['is_confirm_enabled']) || CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $form->_id, 'is_monetary'))) { $errorMsg['confirm_title'] = ts('Please enter a Title for the registration Confirmation Page'); } if (($values['thankyou_title'] ?? '') === '') { -- 2.25.1