From 6a6ab43a28287bb94e9cb1f8fbb48c86ab3a90ab Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 3 Sep 2014 12:12:38 +0100 Subject: [PATCH] CRM-15225 - Add comment to explain the fix --- CRM/Core/Form.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Core/Form.php b/CRM/Core/Form.php index 837eba3e38..0f13418efb 100644 --- a/CRM/Core/Form.php +++ b/CRM/Core/Form.php @@ -1750,6 +1750,10 @@ class CRM_Core_Form extends HTML_QuickForm_Page { $this->_chainSelectFields[$settings['control_field']] = $elementName; + // Passing NULL instead of an array of options + // CRM-15225 - normally QF will reject any selected values that are not part of the field's options, but due to a + // quirk in our patched version of HTML_QuickForm_select, this doesn't happen if the options are NULL + // which seems a bit dirty but it allows our dynamically-popuplated select element to function as expected. return $this->add('select', $elementName, $settings['label'], NULL, $settings['required'], $props); } -- 2.25.1