Answers.Body: <p>Take a look at CRM_UF_Page_Group::profile().</p>
  
  <p>You want to do that except instead of passing gid (the profile id) through the url you'd make it a function parameter, and then what you want is the value of the $profile variable.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-09T21:41:53.920Z
Answers.LastActivityDate: 2016-07-09T21:41:53.920Z
Answers.UserDisplayName: Demerit
Body: <p>Using the administrative dashboard I can obtain an HTML Form Snippet for any profile which I can use to embed in any webpage or context. This is an extremely useful feature.</p>
  
  <p>Is there any way to obtain it programatically, for example using the API or using Drush or some other command or URI foo, so that administrators can change the Profile and the embedded forms will always be updated?</p>
  
Tags: <api><profile><forms><form-snippets>
Title: Programatically obtaining a Profile's HTML Snippet
ThreadText: # Programatically obtaining a Profile's HTML Snippet
  
  (Asked by: username_0 on 2016-07-09)
  
  Using the administrative dashboard I can obtain an HTML Form Snippet for any profile which I can use to embed in any webpage or context. This is an extremely useful feature.
  
  Is there any way to obtain it programatically, for example using the API or using Drush or some other command or URI foo, so that administrators can change the Profile and the embedded forms will always be updated?
  
  **Tags:** api, profile, forms, form-snippets
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-07-09. Score: 1 | Accepted answer
  
  Take a look at CRM\_UF\_Page\_Group::profile().
  
  You want to do that except instead of passing gid (the profile id) through the url you'd make it a function parameter, and then what you want is the value of the $profile variable.
  
  
  ---
  
  