From 334826975503bb91a3f73847ff24013824501211 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 6 Apr 2020 11:48:52 -0400 Subject: [PATCH] Fix setting custom field TextArea attributes The code was potentially overwriting attributes for existing fields during update ops --- CRM/Core/BAO/CustomField.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Core/BAO/CustomField.php b/CRM/Core/BAO/CustomField.php index d7d1fc3cd3..a44e754fa7 100644 --- a/CRM/Core/BAO/CustomField.php +++ b/CRM/Core/BAO/CustomField.php @@ -1965,8 +1965,8 @@ WHERE id IN ( %1, %2 ) } } - // since we need to save option group id :) - if (!isset($params['attributes']) && strtolower($htmlType) == 'textarea') { + // Set default textarea attributes + if ($op == 'create' && !isset($params['attributes']) && $htmlType == 'TextArea') { $params['attributes'] = 'rows=4, cols=60'; } return $params; -- 2.25.1