Hide form to users who have already submitted it

forms

#1

Hi guys

I have several forms on my website, one of which is contains quite a few fields and is rather detailed. I’d like to be able to hide this form to users who have already filled out.

Currently I am using the HUBL contact variable and checking the lifecycle stage:

{% if contact.lifecyclestage %}
// do nothing
{% else %}
//output form
{% endif %}

however I assume that this means the form will also be hidden if a user fills out any other forms (e.g newsletter subscribe).

How can I hide a form only when a user has already filled out that specific one?

Thanks.


Custom cookie request: List membership
#2

Hi @MikeyWallis,

Your best bet might be to use the Smart Content functionality. You can choose to show/hide certain modules based on a contact’s list membership; you could create a smart list of the contacts who submitted your form, and then create a smart rule to hide that form if the contact is a member of that list. This user guide comprehensively covers smart content and how to implement it:


#3

Hey Derek

Thanks for this, looks like its working perfectly.


#4

if I am custom building forms using js and the forms api. I’d like to pull off this same trick - if a person’s ‘leadscore’ is high enough - skip the form entirely - and provide them content - but I need to be able to tell hubspot (presumably through a blind form submission using their cookie’d information) that they visited the page and got the streamlined path to the content.


#5

Hi @rmcdiarmid,

If this is all on an external page, you’d likely need to make a call to the ‘Get contact by usertoken’ endpoint, and then render/hide page content based on the response: