Answers.Body: <p>You can use <a href="https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_managed/" rel="nofollow noreferrer">managed</a> hook to create custom field on install</p>
  
  <ol>
  <li>Create Option Group
  2.Create option values for option group</li>
  <li>Create custom group</li>
  <li>Create custom field.</li>
  </ol>
  
  <p>There is another way of doing this i.e by creating xml file. A good example to refer would be <a href="https://github.com/compucorp/civihr/blob/master/hrcareer/xml/auto_install.xml" rel="nofollow noreferrer">https://github.com/compucorp/civihr/blob/master/hrcareer/xml/auto_install.xml</a></p>
  
  <p>HTH</p>
  
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-13T11:20:01.203Z
Answers.Text: How to set values to the custom field using API?
Answers.UserDisplayName: Dipak Giri
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-13T10:40:11.743Z
Answers.LastActivityDate: 2018-12-13T10:40:11.743Z
Answers.UserDisplayName: Pradeep Nayak
Answers.Body: <p>It sounds like you are looking for this hook:
  <a href="https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_fieldOptions/" rel="nofollow noreferrer">https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_fieldOptions/</a></p>
  
  <p>It lets you set the values in the select dropdown on-the-fly.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-14T06:07:01.280Z
Answers.Text: How to add values for the custom field using API explorer v3? (support -> Developer ->API explorer v3).
Answers.UserDisplayName: Dipak Giri
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-14T09:46:51.793Z
Answers.Text: I saw documentation but not understood. Please give some example.
Answers.UserDisplayName: Dipak Giri
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-13T23:47:55.947Z
Answers.LastActivityDate: 2018-12-13T23:47:55.947Z
Answers.UserDisplayName: Demerit
Body: <p>I am creating an extension. I created a custom group and custom field. The data and input field type is alphanumeric and select. I want to add multiple choice option into that custom field using an extension. 
  <a href="https://i.sstatic.net/silsB.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/silsB.png" alt="enter image description here"></a></p>
  
Tags: <extension>
Title: How to add a values (html select) to custom field?
ThreadText: # How to add a values (html select) to custom field?
  
  (Asked by: username_0 on 2018-12-13)
  
  I am creating an extension. I created a custom group and custom field. The data and input field type is alphanumeric and select. I want to add multiple choice option into that custom field using an extension.
  [![enter image description here](https://i.sstatic.net/silsB.png)](https://i.sstatic.net/silsB.png)
  
  **Tags:** extension
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-12-13. Score: 1 | Accepted answer
  
  You can use [managed](https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_managed/) hook to create custom field on install
  
  1. Create Option Group
     2.Create option values for option group
  2. Create custom group
  3. Create custom field.
  
  There is another way of doing this i.e by creating xml file. A good example to refer would be <https://github.com/compucorp/civihr/blob/master/hrcareer/xml/auto_install.xml>
  
  HTH
  
  Pradeep
  
  > **Comments:**
  > **username_0**: How to set values to the custom field using API?  
  
  ---
  
  ### Answer by username_2 on 2018-12-13. Score: 0
  
  It sounds like you are looking for this hook:
  <https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_fieldOptions/>
  
  It lets you set the values in the select dropdown on-the-fly.
  
  > **Comments:**
  > **username_0**: How to add values for the custom field using API explorer v3? (support -> Developer ->API explorer v3).  
  > **username_0**: I saw documentation but not understood. Please give some example.  
  
  ---
  
  