Answers.Body: <p>So the only way I have figured out how to do this, is using the buildForm hook from an extension.</p>
  <p>You would need to check what profile form id is and then make the changes to the specific fields as needed.</p>
  <p>This thread has similar example but would need to be modified for a profile form: <a href="https://civicrm.stackexchange.com/questions/42359/how-to-create-a-custom-extension-module-with-an-example">How to create a custom extension/module (with an example)?</a></p>
  <p>Once in the buildForm hook, you would use something like this:</p>
  <pre><code>if ( $formName == 'CRM_Profile_Form_Edit' &amp;&amp; $form-&gt;getVar('_gid') == 15 ) {
    //Do something with profile form that has gid = 15
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-30T02:06:09.293Z
Answers.LastActivityDate: 2022-08-01T04:28:03.133Z
Answers.LastEditDate: 2022-08-01T04:28:03.133Z
Answers.UserDisplayName: jsherk
Body: <p>If I create a new custom field with a Drop Down list, you can set a Default if you want, or leave it as blank (no default).</p>
  <p>What I want to do is leave as blank (no default) when I use the field in one particular profile, but on another profile, I need it to default to a specific choice, and then on a third profile, I need it set again to another option.</p>
  <p>EDIT: To add to this question...
  Is it possible to select a different default COUNTRY in different profiles as well?</p>
  
Tags: <webform-civicrm><profile><forms>
Title: How to set a different default drop down item depending on profile used
ThreadText: # How to set a different default drop down item depending on profile used
  
  (Asked by: username_0 on 2022-07-24)
  
  If I create a new custom field with a Drop Down list, you can set a Default if you want, or leave it as blank (no default).
  
  What I want to do is leave as blank (no default) when I use the field in one particular profile, but on another profile, I need it to default to a specific choice, and then on a third profile, I need it set again to another option.
  
  EDIT: To add to this question...
  Is it possible to select a different default COUNTRY in different profiles as well?
  
  **Tags:** webform-civicrm, profile, forms
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-07-30. Score: 1 | Accepted answer
  
  So the only way I have figured out how to do this, is using the buildForm hook from an extension.
  You would need to check what profile form id is and then make the changes to the specific fields as needed.
  This thread has similar example but would need to be modified for a profile form: How to create a custom extension/module (with an example)?
  Once in the buildForm hook, you would use something like this:
  if ( $formName == 'CRM_Profile_Form_Edit' && $form->getVar('_gid') == 15 ) {
    //Do something with profile form that has gid = 15
  }
  
  
  ---
  
  