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 -- Francesco

  • 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.
    – petednz - fuzion
    Apr 2 '19 at 19:56
  • 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.
    – petednz - fuzion
    Apr 2 '19 at 20:14
  • 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. Apr 2 '19 at 21:39
  • 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. Apr 2 '19 at 23:17
  • 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? Apr 3 '19 at 1:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.