Answers.Body: <p>You might also need to use <a href="https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_buildForm/" rel="nofollow noreferrer">hook_civicrm_buildForm</a> in an extension to override what's happening in CRM/Contact/Form/Edit/Individual.php, e.g. check the value of your setting <a href="https://github.com/civicrm/civicrm-core/blob/da176e2b330d0d7031c2840c3375c32a35683716/CRM/Contact/Form/Edit/Individual.php#L38-L53" rel="nofollow noreferrer">something like this</a> but less goofy, and then remove the nick_name field from the form.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-03T09:21:09.183Z
Answers.Text: Is there no way to modify CRM core? Nicknames are more used in the Anglo-saxon world then elsewhere. having a checkbox in display preferences just like 'other firstname' would be great. We could handle this PR but we can't find the functiuns and pages to modify.
Answers.UserDisplayName: Guillaume Sorel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-03T14:14:58.110Z
Answers.Text: I linked to the function you'd need to change above. To add the option value you'd need to add that [here](https://github.com/civicrm/civicrm-core/blob/68eb08aa0afef3a7fca4207376bedcc29aef78b2/xml/templates/civicrm_data.tpl#L491) and then also add an upgrade script.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-03T15:09:15.977Z
Answers.Text: great! thanks Dave.
Answers.UserDisplayName: Guillaume Sorel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-17T11:01:34.387Z
Answers.Text: do you know which template manages the contact summary where we also want to remove 'Nick Name'. We'll probably go for an extension instead of committing to CiviCRM's core.
Answers.UserDisplayName: Guillaume Sorel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-17T15:24:57.087Z
Answers.Text: You shouldn't need edit the template if you use hook_civicrm_buildForm to alter the form based on your setting, but for reference it's https://github.com/civicrm/civicrm-core/blob/093e8cc14b638518ace7131472225302a9683eee/templates/CRM/Contact/Form/Edit/Individual.tpl#L71
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-17T15:51:55.590Z
Answers.Text: ok thanks for the form but what about the summary?
Answers.UserDisplayName: Guillaume Sorel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-17T15:59:34.573Z
Answers.Text: Most forms are the same form for view and edit. I think this one is too.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-18T15:30:20.637Z
Answers.Text: so we shouldn't edit this template https://github.com/civicrm/civicrm-core/blob/093e8cc14b638518ace7131472225302a9683eee/templates/CRM/Contact/Form/Inline/ContactInfo.tpl?
Answers.UserDisplayName: Guillaume Sorel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-01T17:56:05.720Z
Answers.LastActivityDate: 2021-03-01T21:38:53.993Z
Answers.LastEditDate: 2021-03-01T21:38:53.993Z
Answers.UserDisplayName: Demerit
Body: <p>I'm trying to add an option to disable the display of nickname in the setting preferences.
  The checkbox is appearing but it doesn't work, when the option is not checked the nickname field shouldn't appear in the contact.
  I added the option value with Apiv4.</p>
  <p>btw Surnom = Nickname
  <a href="https://i.sstatic.net/tumRB.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/tumRB.png" alt="enter image description here" /></a>
  <a href="https://i.sstatic.net/Tkpop.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Tkpop.png" alt="enter image description here" /></a></p>
  
Tags: <display><preferences><fieldoptions>
Title: How to disable nickname field
ThreadText: # How to disable nickname field
  
  (Asked by: username_0 on 2021-03-01)
  
  I'm trying to add an option to disable the display of nickname in the setting preferences.
  The checkbox is appearing but it doesn't work, when the option is not checked the nickname field shouldn't appear in the contact.
  I added the option value with Apiv4.
  
  btw Surnom = Nickname
  [![enter image description here](https://i.sstatic.net/tumRB.png)](https://i.sstatic.net/tumRB.png)
  [![enter image description here](https://i.sstatic.net/Tkpop.png)](https://i.sstatic.net/Tkpop.png)
  
  **Tags:** display, preferences, fieldoptions
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-03-01. Score: 1
  
  You might also need to use [hook\_civicrm\_buildForm](https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_buildForm/) in an extension to override what's happening in CRM/Contact/Form/Edit/Individual.php, e.g. check the value of your setting [something like this](https://github.com/civicrm/civicrm-core/blob/da176e2b330d0d7031c2840c3375c32a35683716/CRM/Contact/Form/Edit/Individual.php#L38-L53) but less goofy, and then remove the nick\_name field from the form.
  
  > **Comments:**
  > **username_2**: Is there no way to modify CRM core? Nicknames are more used in the Anglo-saxon world then elsewhere. having a checkbox in display preferences just like 'other firstname' would be great. We could handle this PR but we can't find the functiuns and pages to modify.  
  > **username_1**: I linked to the function you'd need to change above. To add the option value you'd need to add that [here](https://github.com/civicrm/civicrm-core/blob/68eb08aa0afef3a7fca4207376bedcc29aef78b2/xml/templates/civicrm_data.tpl#L491) and then also add an upgrade script.  
  > **username_2**: great! thanks Dave.  
  > **username_2**: do you know which template manages the contact summary where we also want to remove 'Nick Name'. We'll probably go for an extension instead of committing to CiviCRM's core.  
  > **username_1**: You shouldn't need edit the template if you use hook_civicrm_buildForm to alter the form based on your setting, but for reference it's https://github.com/civicrm/civicrm-core/blob/093e8cc14b638518ace7131472225302a9683eee/templates/CRM/Contact/Form/Edit/Individual.tpl#L71  
  > **username_2**: ok thanks for the form but what about the summary?  
  > **username_1**: Most forms are the same form for view and edit. I think this one is too.  
  > **username_2**: so we shouldn't edit this template https://github.com/civicrm/civicrm-core/blob/093e8cc14b638518ace7131472225302a9683eee/templates/CRM/Contact/Form/Inline/ContactInfo.tpl?  
  
  ---
  
  