CRM-18436: Non-mandatory custom rich text fields are mandatory in advanced search
authordeb.monish <monish.deb@webaccessglobal.com>
Tue, 19 Apr 2016 19:09:35 +0000 (00:39 +0530)
committerdeb.monish <monish.deb@webaccessglobal.com>
Tue, 19 Apr 2016 19:09:35 +0000 (00:39 +0530)
CRM/Core/BAO/CustomField.php

index f4ea4fc68f6d05084f45dfa60e6031c374d18a05..13d0568151bc704a8bc7f6374fc969b44fbd3b84 100644 (file)
@@ -1007,7 +1007,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
         if ($field->text_length) {
           $attributes['maxlength'] = $field->text_length;
         }
-        $element = $qf->add('wysiwyg', $elementName, $label, $attributes, $search);
+        $element = $qf->add('wysiwyg', $elementName, $label, $attributes, $useRequired && !$search);
         break;
 
       case 'Autocomplete-Select':