I get the following error and backtrace. If I disable the Formal title option in Admin Display Settings then I dont' get the error.

Exception: "Unsupported html-element "

#0 /home/saintfran/www/www/sites/all/modules/civicrm/CRM/Contact/Form/Edit/Individual.php(81): CRM_Core_Form->addField("formal_title", (Array:0))
#1 /home/saintfran/www/www/sites/all/modules/civicrm/CRM/Contact/Form/Contact.php(766): CRM_Contact_Form_Edit_Individual::buildQuickForm(Object(CRM_Contact_Form_Contact))
#2 /home/saintfran/www/www/sites/all/modules/civicrm/CRM/Core/Form.php(540): CRM_Contact_Form_Contact->buildQuickForm()
#3 /home/saintfran/www/www/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(92): CRM_Core_Form->buildForm()
#4 /home/saintfran/www/www/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Contact_Form_Contact), "display")
#5 /home/www/www/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Contact), "display")
#6 /home/www/www/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("display")
#7 /home/www/www/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(113): CRM_Core_Controller->run()
#8 /home/www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(286): CRM_Utils_Wrapper->run("CRM_Contact_Form_Contact", "New Contact", (Array:1))
#9 /home/www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
#10 /home/www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
#11 /home/www/www/sites/all/modules/civicrm/drupal/civicrm.module(454): CRM_Core_Invoke::invoke((Array:3))
#12 [internal function](): civicrm_invoke("contact", "add")
#13 /home/www/www/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2))
#14 /home/www/www/index.php(21): menu_execute_active_handler()
#15 {main}



1 Answer 1


Similar issue is being filed here https://issues.civicrm.org/jira/browse/CRM-17831.

This has been fixed in 4.7.2 at https://github.com/civicrm/civicrm-core/pull/7770/files.

Update: As xml files are not included in the downloaded Civi. For the time being, can you please make the following changes at fields() function in CRM/Contact/DAO/Contact.php.

'formal_title' => array(
   'name' => 'formal_title',
   'export' => true,
   'html' => array(        <--- include this
     'type' => 'Text',
   ) ,
 ) ,
  • I'm not sure how to make the change to the xml file. I tried downloading the master and upgrading but get a white screen of death. then i tried just updating the CRM/Contact/Form/Edit/Individual.php file but still get the same error. No clue where to update the xml/schema/Contact/Contact.xml file.
    – frTommy
    Feb 10, 2016 at 3:28
  • @frTommy My bad, I missed to mention xml are not included in the downloaded civi. Updated the answer to work for now. Feb 10, 2016 at 5:41
  • After making the edit to the file, I realized it should be 'Text' instead of 'Select'. The Formal Title field is just a regular text field instead of a select field. But after changing it to 'Text' that fixed the issue.
    – frTommy
    Feb 11, 2016 at 3:38
  • yeah, thats correct, was a typo ;) Feb 11, 2016 at 5:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.