From: larssandergreen <lars@wildsight.ca>
Date: Fri, 2 Jun 2023 18:47:40 +0000 (-0600)
Subject: Set options_per_line to zero when changing Custom Field html_type
X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=19b46c9530a97b1b1eea7deb84da852e40638ba4;p=civicrm-core.git

Set options_per_line to zero when changing Custom Field html_type
---

diff --git a/templates/CRM/Custom/Form/Field.tpl b/templates/CRM/Custom/Form/Field.tpl
index 184d63079a..7ed7436cea 100644
--- a/templates/CRM/Custom/Form/Field.tpl
+++ b/templates/CRM/Custom/Form/Field.tpl
@@ -216,6 +216,9 @@
       if (htmlType === 'CheckBox' || htmlType === 'Radio') {
         $('#serialize', $form).prop('checked', htmlType === 'CheckBox');
       }
+      else {
+        $("#options_per_line", $form).val('');
+      }
 
       showSearchRange(dataType);
       customOptionHtmlType(dataType);