Automatically Save the Page URL Where the Form is Embedded

You can add the same form on multiple pages. However, this may lead to confusion on understanding which page’s form is giving you the leads. In Aritic PinPoint, you can automatically save the page URL to get detailed information of which form is performing how and where.

How to Automatically Save the Page URL Where the Form is Embedded.


1. Login to your Aritic PinPoint dashboard > Assets> Forms > Design a new form or edit an existing form.

2. Select any type of form and click on Next.

3. Choose any form Template and click on next .

4. Inside your form, go to the fields tab and add a new field Hidden.

5. Here we will put “Ref”. You can name it as per your requirements. Make sure you fill  this field and click on “add” .

6. Again go back to Fields, and choose a new field +HTML Area. You can name it anything you want. We are using Hidden as the name and click on add .

 

 

7. Next click on the Properties. There, simply copy and paste the script as given below:

[lore_alert_message type=”info”]

<script> var formName = ‘testfaq’; if (typeof MauticFormCallback == ‘undefined’) {var MauticFormCallback = {};} MauticFormCallback[formName] = {onValidateStart: function () {document.getElementById(‘mauticform_input_testfaq_ref’).value = document.URL; }, }; </script>

[/lore_alert_message] 

 

8. In the HTML script, modify test FAQ with the name of your form. For instance, if your form name is a demo, then your script’s starting should read as <script>var formName =’ Demo’; See the example below:

9. In the attributes tab, add style=”display:none;” CSS style to hide the name and content of the HTML field.

10. Save the form.

[lore_alert_message type=”info”]

When your contacts submit this form, the “ref” field will indicate the URL of the pages from where your contacts have submitted the form. You can integrate URL in your form results by simply adding “send form results” action in the form.

[/lore_alert_message]