Lead Capture Tools

RyanTheKingdom
Member

If/Then For Forms

SOLVE

Hi folks,

I would like to create an if/then dependent on form submission to link with my meetings calendar. We have 2 stores, reflected by a drop down choice in my submission form.

What I would like to create is a flow as follows - if 'contact' selects 'store 1' then redirects to 'store 1 meetings page' / if contact selects 'store 2' then redirects to 'store 2 meetings page'.

I don't believe that multi-step forms are the answer, so keen to hear the community's thoughts.

Thanks kindly,
Ryan

1 Accepted solution
ndwilliams3
Solution
Key Advisor

If/Then For Forms

SOLVE

Can't really adjust the redirect url based on field data. As a workaround, I would use an inline message. You can then use a HUBL if statment to show a link to the meetings page based to the option selected.

 

Add the following code to your inline message WYSIWYG using the source code editor.

 

store in contact.store shoud be the name of your field in contact properties.

Make sure the values "store 1" and "store 2" are the actual values for the contact property.

Update the URL's to your actual meetings pages.

<p>Thank you message text</p>
{% if contact.store == "store 1" %} <a href="http://example.com/meetings-page-store-1">Schedule a Meeting</a> {% if contact.store == "store 2" %} <a href="http://example.com/meetings-page-store-2">Schedule a Meeting</a> {% else %} <!-- add something here if you need a generic option --> {% endif %}

 

View solution in original post

4 Replies 4
ndwilliams3
Solution
Key Advisor

If/Then For Forms

SOLVE

Can't really adjust the redirect url based on field data. As a workaround, I would use an inline message. You can then use a HUBL if statment to show a link to the meetings page based to the option selected.

 

Add the following code to your inline message WYSIWYG using the source code editor.

 

store in contact.store shoud be the name of your field in contact properties.

Make sure the values "store 1" and "store 2" are the actual values for the contact property.

Update the URL's to your actual meetings pages.

<p>Thank you message text</p>
{% if contact.store == "store 1" %} <a href="http://example.com/meetings-page-store-1">Schedule a Meeting</a> {% if contact.store == "store 2" %} <a href="http://example.com/meetings-page-store-2">Schedule a Meeting</a> {% else %} <!-- add something here if you need a generic option --> {% endif %}

 

ringsleighton
Member

If/Then For Forms

SOLVE

I am trying to do something similar, and this looks like the solution I need.

But when I try to paste the code into the source code editor, all the HUBL code is displaying as text in the thannk you message. Is there something I'm doing wrong?

0 Upvotes
eduardobetioli
Member

If/Then For Forms

SOLVE

Is that working yet? 

0 Upvotes
Ben_M
Key Advisor

If/Then For Forms

SOLVE

@eduardobetioli - As this solution was already marked as resolved, the poster likely implemented with success.  But as the post is 2 years old, they may not respond.  You can actually dynamically change the redirectURL on a form submit, but you can only do it with Hubspot embeded forms where you are either customizing the embed code per their documentation ( https://developers.hubspot.com/docs/methods/forms/advanced_form_options ) or by reposting to a Hubspot form through another form processor/processing script (ie: gravity forms, ninja forms or a custom form script).

0 Upvotes