APIs & Integrations

dimitreliasb
Contributor

Forms with hidden data - Pull url from external page into customer properties

I am embedding a form on an external site on several different pages. I want to create a workflow based on what page the user submitted the form from. Example: If the user was on this url then send this email. If not then check if he was on one of the other url’s and so forth. I have tried pulling the page url into a hidden filed of a property I created but does not seem to trigger the workflow or pull any data. I am using this code where “web_url” is my property name: onFormReady: function( $form) {$('input[name="web_url"]').val(window.location.href).change();} Any ideas on how to solve this issue? Is this the right approach or should I try setting up the workflow a different way?

0 Upvotes
3 Replies 3
IsaacTakushi
HubSpot Employee
HubSpot Employee

Forms with hidden data - Pull url from external page into customer properties

Welcome, @dimitreliasb.

 

Your approach is sound and your code looks good from here.

 

To clarify, does the form submit successfully, just without the hidden field populated? If so, could you share the following via direct message?

  • A link to the workflow in question.
  • The full modified embed code.
  • A link to a page on which the form is embedded.

Isaac Takushi

Associate Certification Manager
0 Upvotes
dimitreliasb
Contributor

Forms with hidden data - Pull url from external page into customer properties

Hi Isaac,

Thanks for responding. Yes the form does submit correctly and triggers the workflow. It is just the hidden field value (in my case the URL) I cannot seem to pass. I will get you a sample soon. working on a dev platform and its not accesible outside our building.

 

Basilios

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Forms with hidden data - Pull url from external page into customer properties

Hey, @dimitreliasb!

 

Did you ever get this working?

Isaac Takushi

Associate Certification Manager
0 Upvotes