Body: <p>I want to publish an online form to collect info requests, putting them in CiviCRM Contacts.
  I prepared a CiviCRM profile showing these standard fields:</p>
  
  <ul>
  <li>First and Last Name,</li>
  <li>Email,</li>
  <li>Phone,</li>
  <li>Contact Source</li>
  <li>Note.</li>
  </ul>
  
  <p>Now I want to set <strong>Contact Source</strong> field as hidden and autofill it with "Web request info page" string, as a <code>&lt;input type="hidden" value="Web request info page"&gt;</code> in HTML. CiviCRM is installed under Wordpress.</p>
  
  <p>How can I do this?
  TIA -- Francesco</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-02T19:56:54.983Z
Comments.Text: I think we may have a solution in an extension, or maybe a PR. let me go check it out. Makes use of the Public Field concept that previously only worked for Events.
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-02T20:14:19.497Z
Comments.Text: sorry. I think the original work was to make 'public fields' an option for Event fields, then we did some extra work for so it worked for Contribution fields too. am not sure the status for just Contact fields but will check and update here.
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-02T21:39:44.847Z
Comments.Text: Thank you very much. Realizing these kind of functionalities in profiles, allows to catch almost any kind of data from web visitors and profile them for future work in the created contacts.
Comments.UserDisplayName: Francesco Garganese
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-02T23:17:51.930Z
Comments.Text: Checking the **"View Only?"** option on a field, give the `<input type="hidden">` as result using the profile in create mode; the missing piece is to insert the value in the hidden field. Inserting the value as a URL parameter produce no result.
Comments.UserDisplayName: Francesco Garganese
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-03T01:36:44.837Z
Comments.Text: I don't think you want to set the field to "View Only" - that is probably the issue.  "View Only" fields can only be updated via the API.  Also, can we assume you're using "HTML Snippets" for a profile?  Or are you using another tool?  Have you considered using Caldera Forms-CiviCRM?
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-03T10:29:55.037Z
Comments.Text: Trying without **"View Only"** and inserting the value as a URL parameter doesn't solve too.
  I started to work using Caldera Forms-CiviCRM, without understand how to write a contact record or upgrade an existing thru the form in the db. Until now the form catch the data from the db but sends only emails.
Comments.UserDisplayName: Francesco Garganese
Tags: <wordpress><profile><forms><fields>
Title: Set CiviCRM profile standard field as hidden and autofill it with a string in Wordpress
ThreadText: # Set CiviCRM profile standard field as hidden and autofill it with a string in Wordpress
  
  (Asked by: username_0 on 2019-04-02)
  
  I want to publish an online form to collect info requests, putting them in CiviCRM Contacts.
  I prepared a CiviCRM profile showing these standard fields:
  
  * First and Last Name,
  * Email,
  * Phone,
  * Contact Source
  * Note.
  
  Now I want to set **Contact Source** field as hidden and autofill it with "Web request info page" string, as a `<input type="hidden" value="Web request info page">` in HTML. CiviCRM is installed under Wordpress.
  
  How can I do this?
  TIA -- username_0
  
  **Tags:** wordpress, profile, forms, fields
  
  > **Comments:**
  > **username_1**: I think we may have a solution in an extension, or maybe a PR. let me go check it out. Makes use of the Public Field concept that previously only worked for Events.  
  > **username_1**: sorry. I think the original work was to make 'public fields' an option for Event fields, then we did some extra work for so it worked for Contribution fields too. am not sure the status for just Contact fields but will check and update here.  
  > **username_0**: Thank you very much. Realizing these kind of functionalities in profiles, allows to catch almost any kind of data from web visitors and profile them for future work in the created contacts.  
  > **username_0**: Checking the **"View Only?"** option on a field, give the `<input type="hidden">` as result using the profile in create mode; the missing piece is to insert the value in the hidden field. Inserting the value as a URL parameter produce no result.  
  > **username_2**: I don't think you want to set the field to "View Only" - that is probably the issue.  "View Only" fields can only be updated via the API.  Also, can we assume you're using "HTML Snippets" for a profile?  Or are you using another tool?  Have you considered using Caldera Forms-CiviCRM?  
  > **username_0**: Trying without **"View Only"** and inserting the value as a URL parameter doesn't solve too. I started to work using Caldera Forms-CiviCRM, without understand how to write a contact record or upgrade an existing thru the form in the db. Until now the form catch the data from the db but sends only emails.  
  
  ---
  
  ## 0 answers
  
  