CMS Development

mrspabs
トップ投稿者 | Elite Partner
トップ投稿者 | Elite Partner

Popup with cookie on external site

My client, unfortunately, does not like the look of the Hubspot popup form. They have asked me to program a custom one that will 

1 - check to see if the visitor has already completed a form (via cookie)

2 - If no, then popup a modal with an embedded hubspot form

3- after the fill out the form, auto close the form via javascript.

 

Is this possible and if so, can someone point me to to some help docs or links? The popup will show on a non hubspot website (wordpress)

0 いいね!
2件の返信
alyssamwilie
名誉エキスパート | Elite Partner
名誉エキスパート | Elite Partner

Popup with cookie on external site

If you are using a regular Hubspot form intsead of a Hubpot Pop Up form I imagine you would need to use the Hubspot contacts API to grab the contact's information by their user token and check if they are in the partilcuar list you want to filter by.

https://developers.hubspot.com/docs/methods/contacts/get_contact_by_utk

For auto-closing the form on successful submission you could use the form embed code's onFormSubmit function to do this.

hbspt.forms.create({
    portalId: "{{ PORTAL.ID }}",
    formId: "{{ FORM.ID }}",
    onFormSubmit: function($form) {
      $('#custom-form-wrapper').hide();
    } 
});


Alyssa Wilie
Web Developer
LyntonWeb

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.
0 いいね!
Kim_HM
トップ投稿者 | Diamond Partner
トップ投稿者 | Diamond Partner

Popup with cookie on external site

Hi @mrspabs ,

 

To show the pop-up form only to people who have not yet completed a form, you can use the built-in targeting. Based on whether someone is in a list that you have chosen, the pop-up form is displayed or not. For more information about targeting, please take a look here

 

Regarding autoclose after the form has been filled in, this is not possible as standard in HubSpot. Hopefully someone from the Community will respond who has more experience with this topic.

 

Please let me know if I can help you any further with the first part of your question! 

 

Kind regards, 

Kim