Answers.Body: <p>I've used a custom template page with jquery to do something similar. (I wanted the event to assume they were registering themselves and one other person - and NOT allow them to see they could choose how many.)</p>
  
  <p>I wrote a quick jquery statement to preselect the value and then hide the option altogether with css.</p>
  
  <p><a href="https://civicrm.org/blog/hershel/how-customize-civicrm-pages-jquery" rel="nofollow">https://civicrm.org/blog/hershel/how-customize-civicrm-pages-jquery</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-05T20:53:27.080Z
Answers.LastActivityDate: 2016-05-05T20:53:27.080Z
Answers.UserDisplayName: RayWright
Answers.Body: <p>Take a look at CiviRules. It could potentially add a Guest Membership based on people who fill in that profile being added to a specific group, so base the rule off 'if contact is added to Group x, then give them membership type Y".</p>
  
  <p>Above suggestion is just that, i have not gone in to CiviRules to verify</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-06T02:20:12.037Z
Answers.LastActivityDate: 2016-05-06T02:20:12.037Z
Answers.UserDisplayName: petednz - fuzion
Answers.Body: <p>I think you can use CiviCRM hooks as Hook functions  allow module-extensions to run extra logic as part of the normal CiviCRM processing</p>
  
  <p>A video could be found <a href="https://www.youtube.com/watch?v=jbaGAy2EJIs" rel="nofollow">here</a> , In this video, an extension i created and it is demonstrated how to preset custom fields with values when the form load s</p>
  
  <p>You can as well look at <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension" rel="nofollow">Implementing hooks within an extension</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-02T18:48:09.117Z
Answers.LastActivityDate: 2016-05-02T18:48:09.117Z
Answers.UserDisplayName: Merci Mukwe
Body: <p>I'm trying to create a profile to be used as a form, but rather than having the user populate certain fields, have the form populate them automatically. An example of what I'm trying to do:</p>
  
  <p>The profile form is only presented to people that are registering as guests, therefore I want to pre-select the Membership Type as <code>Guest</code> rather than allowing the user to select the membership type. In fact, I don't even want the user to see the membership type field.</p>
  
  <p>I'm running CiviCRM 4.7.6 on WordPress 4.4.2.</p>
  
Tags: <civimember><profile>
Title: Can a Profile have hidden fields with preselescted or predefined values?
ThreadText: # Can a Profile have hidden fields with preselescted or predefined values?
  
  (Asked by: username_0 on 2016-05-02)
  
  I'm trying to create a profile to be used as a form, but rather than having the user populate certain fields, have the form populate them automatically. An example of what I'm trying to do:
  
  The profile form is only presented to people that are registering as guests, therefore I want to pre-select the Membership Type as `Guest` rather than allowing the user to select the membership type. In fact, I don't even want the user to see the membership type field.
  
  I'm running CiviCRM 4.7.6 on WordPress 4.4.2.
  
  **Tags:** civimember, profile
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2016-05-05. Score: 1 | Accepted answer
  
  I've used a custom template page with jquery to do something similar. (I wanted the event to assume they were registering themselves and one other person - and NOT allow them to see they could choose how many.)
  
  I wrote a quick jquery statement to preselect the value and then hide the option altogether with css.
  
  <https://civicrm.org/blog/hershel/how-customize-civicrm-pages-jquery>
  
  
  ---
  
  ### Answer by username_2 on 2016-05-06. Score: 0
  
  Take a look at CiviRules. It could potentially add a Guest Membership based on people who fill in that profile being added to a specific group, so base the rule off 'if contact is added to Group x, then give them membership type Y".
  
  Above suggestion is just that, i have not gone in to CiviRules to verify
  
  
  ---
  
  ### Answer by username_3 on 2016-05-02. Score: 0
  
  I think you can use CiviCRM hooks as Hook functions allow module-extensions to run extra logic as part of the normal CiviCRM processing
  
  A video could be found [here](https://www.youtube.com/watch?v=jbaGAy2EJIs) , In this video, an extension i created and it is demonstrated how to preset custom fields with values when the form load s
  
  You can as well look at [Implementing hooks within an extension](https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension)
  
  
  ---
  
  