diff --git a/CRM/Custom/Form/Group.php b/CRM/Custom/Form/Group.php index e8c3410f181..0d6ed12925e 100644 --- a/CRM/Custom/Form/Group.php +++ b/CRM/Custom/Form/Group.php @@ -311,14 +311,12 @@ public function postProcess() { CRM_Core_Session::setStatus(ts('Your custom field set \'%1 \' has been saved.', [1 => $group['title']]), ts('Saved'), 'success'); } else { - // Jump directly to adding a field if popups are disabled - $action = CRM_Core_Resources::singleton()->ajaxPopupsEnabled ? '' : '/add'; - $url = CRM_Utils_System::url("civicrm/admin/custom/group/field$action", 'reset=1&new=1&gid=' . $group['id']); + // Redirect to search display of fields + $url = Civi::url('civicrm/admin/custom/group/fields#/?gid=' . $group['id']); CRM_Core_Session::setStatus(ts("Your custom field set '%1' has been added. You can add custom fields now.", [1 => $group['title']] ), ts('Saved'), 'success'); - $session = CRM_Core_Session::singleton(); - $session->replaceUserContext($url); + CRM_Core_Session::singleton()->replaceUserContext((string) $url); } // prompt Drupal Views users to update $db_prefix in settings.php, if necessary