QuickForm Error on Contact Search Form when using select custom field of type Integer
To Replicate: Create a 'Select' custom field of type Integer or Number with 'Is this Field Searchable?' checked.
The Advance search form throws fatal error
Aug 17 10:16:57 [info] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -3
[message] => QuickForm Error: nonexistent html element
[mode] => 16
[debug_info] => Element 'custom_8_from' does not exist in HTML_QuickForm::addRule()
[type] => HTML_QuickForm_Error
[user_info] => Element 'custom_8_from' does not exist in HTML_QuickForm::addRule()
[to_string] => [html_quickform_error: message="nonexistent html element" code=-3 mode=callback callback=CRM_Core_Error::handle prefix="QuickForm Error: " info="Element 'custom_8_from' does not exist in HTML_QuickForm::addRule()"]
)
Aug 17 10:16:57 [info] $backTrace = #0 /var/www/html/civicrm-master/sites/all/modules/civicrm/CRM/Core/Error.php(232): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::handle(Object(HTML_QuickForm_Error))
#2 /var/www/html/civicrm-master/sites/all/modules/civicrm/packages/PEAR.php(921): call_user_func((Array:2), Object(HTML_QuickForm_Error))
#3 /var/www/html/civicrm-master/sites/all/modules/civicrm/packages/HTML/QuickForm.php(2084): PEAR_Error->__construct("nonexistent html element", -3, 16, (Array:2), "Element 'custom_8_from' does not exist in HTML_QuickForm::addRule()")
#4 /var/www/html/civicrm-master/sites/all/modules/civicrm/packages/PEAR.php(575): HTML_QuickForm_Error->__construct(-3, 16, (Array:2), "Element 'custom_8_from' does not exist in HTML_QuickForm::addRule()")
#5 [internal function](): PEAR::_raiseError(NULL, NULL, -3, NULL, 512, "Element 'custom_8_from' does not exist in HTML_QuickForm::addRule()", "HTML_QuickForm_Error", TRUE)
#6 /var/www/html/civicrm-master/sites/all/modules/civicrm/packages/PEAR.php(237): call_user_func_array((Array:2), (Array:8))
#7 /var/www/html/civicrm-master/sites/all/modules/civicrm/packages/HTML/QuickForm.php(1076): PEAR::__callStatic("raiseError", (Array:7))
#8 /var/www/html/civicrm-master/sites/all/modules/civicrm/packages/HTML/QuickForm.php(1076): PEAR::raiseError(NULL, -3, NULL, 512, "Element 'custom_8_from' does not exist in HTML_QuickForm::addRule()", "HTML_QuickForm_Error", TRUE)
#9 /var/www/html/civicrm-master/sites/all/modules/civicrm/CRM/Core/BAO/CustomField.php(1103): HTML_QuickForm->addRule("custom_8_from", "number-select From must be a number (with or without decimal point).", "numeric")
#10 /var/www/html/civicrm-master/sites/all/modules/civicrm/CRM/Contact/Form/Search/Criteria.php(567): CRM_Core_BAO_CustomField::addQuickFormElement(Object(CRM_Contact_Form_Search_Advanced), "custom_8", "8", FALSE, TRUE)
#11 /var/www/html/civicrm-master/sites/all/modules/civicrm/CRM/Contact/Form/Search/Advanced.php(150): CRM_Contact_Form_Search_Criteria::custom(Object(CRM_Contact_Form_Search_Advanced))
#12 /var/www/html/civicrm-master/sites/all/modules/civicrm/CRM/Core/Form.php(606): CRM_Contact_Form_Search_Advanced->buildQuickForm()
#13 /var/www/html/civicrm-master/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(92): CRM_Core_Form->buildForm()
#14 /var/www/html/civicrm-master/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Contact_Form_Search_Advanced), "display")
#15 /var/www/html/civicrm-master/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Search_Advanced), "display")
#16 /var/www/html/civicrm-master/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("display")
#17 /var/www/html/civicrm-master/sites/all/modules/civicrm/CRM/Core/Invoke.php(309): CRM_Core_Controller->run((Array:4), (Array:0))
#18 /var/www/html/civicrm-master/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:13))
#19 /var/www/html/civicrm-master/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
#20 /var/www/html/civicrm-master/sites/all/modules/civicrm/drupal/civicrm.module(445): CRM_Core_Invoke::invoke((Array:4))
#21 [internal function](): civicrm_invoke("contact", "search", "advanced")
#22 /var/www/html/civicrm-master/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:3))
#23 /var/www/html/civicrm-master/index.php(21): menu_execute_active_handler()
#24 {main}
When i checked the field through database i found that this field has 'is_search_range' set to TRUE which should be only incase of text or date field i believe.