From e61ff490cd7bd45dfe937b29e265df7b42ac8925 Mon Sep 17 00:00:00 2001 From: Dave Greenberg Date: Sun, 27 Sep 2015 17:28:29 -0400 Subject: [PATCH] CRM-17228 - Improve help text for Profile form snippets. ---------------------------------------- * CRM-17228: HTML Form snippets from profiles should use absolute URLs https://issues.civicrm.org/jira/browse/CRM-17228 --- templates/CRM/UF/Page/Group.hlp | 7 ++++--- templates/CRM/UF/Page/Group.tpl | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/templates/CRM/UF/Page/Group.hlp b/templates/CRM/UF/Page/Group.hlp index c4428230f7..71ced40cd7 100644 --- a/templates/CRM/UF/Page/Group.hlp +++ b/templates/CRM/UF/Page/Group.hlp @@ -49,10 +49,11 @@ {ts}Form Snippet{/ts} {/htxt} {htxt id='standalone'} -

{ts}The HTML Form Snippet code will display a form consisting of the active fields in this Profile. You can copy this HTML code and paste it into any block or page on ANY website where you want to collect contact information.{/ts}

+

{ts}The HTML Form Snippet code will display a form consisting of the active fields in this Profile. You can copy this HTML code and paste it into any block or page on your website where you want to collect contact information.{/ts}

+

{ts}By changing the relative URLs included in the snippet to absolute URLs (e.g. change "/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.min.js?r=dXCgD" to "https://yourdomain.com/sites/all/modules/civicrm/bower_components/jquery/dist/jquery.min.js?r=dXCgD") you will be able to use the snippet on any website.{/ts}

+

{ts}If the web page you are pasting the snippet code to is hosted in a different domain from your CiviCRM site, you may NOT be able to include Country and State fields in the form (the script which dynamically loads the states based on selected country may not be able to execute across domains).{/ts}

{ts}You can control the web page that someone is directed to AFTER completing the form by modifying the contents of the hidden postURL input field. Replace the default value with any valid complete URL prior to saving the form code to the desired page(s).{/ts}

{ts}EXAMPLE:{/ts} <input type="hidden" name="postURL" value="{ts}http://www.example.com/thank_you.html{/ts}">

-

{ts}If the form is submitted with errors (i.e. required field not completed...) - the default behavior is to display the errors within the 'built-in' profile form. You can override this behavior - specifying your own error page - by adding a hidden errorURL input field.{/ts}

{docURL page="user/the-user-interface/profiles"} +

{ts}If the form is submitted with errors (i.e. required field not completed...) - the default behavior is to display the errors within the 'built-in' profile form. You can override this behavior - specifying your own error page - by adding a hidden errorURL input field.{/ts}

{docURL page="user/organising-your-data/profiles/"}

{ts}Make sure the CAPTCHA feature is NOT enabled for this profile when you are grabbing the HTML code. CAPTCHA requires dynamic page generation. Submitting an HTML Snippet profile form with CAPTCHA included will ALWAYS result in a CAPTCHA validation error - which means that the information entered by the user can not be saved.{/ts}

-

{ts}If the web page you are pasting the snippet code to is hosted in a different domain from your CiviCRM site, you may NOT be able to include Country and State fields in the form (the script which dynamically loads the states based on selected country may not be able to execute across domains).{/ts}

{/htxt} diff --git a/templates/CRM/UF/Page/Group.tpl b/templates/CRM/UF/Page/Group.tpl index b8497f5c0c..1ac6f70661 100644 --- a/templates/CRM/UF/Page/Group.tpl +++ b/templates/CRM/UF/Page/Group.tpl @@ -32,7 +32,7 @@ {elseif $action eq 8192} {* Display HTML Form Snippet Code *}
- {ts}The HTML code below will display a form consisting of the active fields in this Profile. You can copy this HTML code and paste it into any block or page on ANY website where you want to collect contact information.{/ts} {help id='standalone'} + {ts}The HTML code below will display a form consisting of the active fields in this Profile. You can copy this HTML code and paste it into any block or page on your website where you want to collect contact information.{/ts} {help id='standalone'}

-- 2.25.1