SOLVED

Stop multiple form submissions from same user

Go to solution
alayton
Level 1

Stop multiple form submissions from same user

I swear I've seen a post on this before, but after a few hours of trying to search for it again I'm just going to ask myself (I'm sorry mods). I've been trying this for quite a while now and think my brain just isn't working correctly anymore so any help is appreciated! 


Context:
We use a Marketo form to 'pre-qualify' potential customers before they're able to create an account. Every user that makes an account, our sales team reaches out to and they spend 75% of their disqualifying people. Since we're a start-up, our resourced are limited. It has very simple logic where if you select x, you are redirected to a page that says you don't qualify. Needless to say, it didn't take people long to figure out if they change their answers it will show they qualify and they can create an account. 

 

 

 

I'd like to be able to stop people from just hitting back and resubmitting it with changed answers. This form is embedded on an external page which complicates things. I'm probably completely missing the mark, so I'm completely open to suggest on how best to go about this! 

 

I've tried a few things, but here's my latest setup:

1. I created a checkbox called getStartedFormFilled and it is a hidden field on the form

alayton_0-1682966356671.png

 

2. I tried to write some script that checks the box on submit. I consolidated it with other script I have but I'm very rusty on my coding: 

<script>// <![CDATA[
MktoForms2.whenReady(function(form){
  form.onSubmit(function(form){

    // check off the checkbox
    var checkboxField = "getStartedFormFilled";
    if (form.getFormElem().find('[name="' + checkboxField + '"]').length > 0) {
      form.getFormElem().find('[name="' + checkboxField + '"]').prop('checked', true);
    }

    // consolidate fields
    var currentValues = form.getValues(),
    fieldsToConsolidate = ["Where_is_your_business_registered__c","Do_you_invoice_businesses__c","What_Industry_is_your_business_in__c","How_much_funding_are_you_looking_for__c"], 
    getStartedConsolidated = 
      fieldsToConsolidate
        .map(function(field){ 
          return currentValues[field]; 
        })
        .join(";");

   form.addHiddenFields({ getStartedConsolidated : getStartedConsolidated });

 });

});
// ]]></script>

 3. Then I added a redirect choice where if this is checked, to go to a different page. I have 6 other options that disqualifies them based on their answers and they all redirect to a different page. Otherwise it goes to a qualifying page. I made this choice 1 so it supersedes the qualification. 

alayton_1-1682966560073.png


What am I doing wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Stop multiple form submissions from same user

(2) As Dave says, simply using Known Visitor HTML is a substitute for all of this. Just don’t include the Submit button in your Known Visitor HTML.

 

And in Admin » Field Management block fields from being updated via form fillout.

 

Naturally, you can’t stop people from clearing their cookies (which will reveal the form again) but you can stop them from being allowed to change the relevant fields.

View solution in original post

6 REPLIES 6
Dave_Roberts
Level 10

Re: Stop multiple form submissions from same user

I'm not sure what's going on with the script exactly, but maybe you could try to leverage Progressive Profiling on the field so that if it's already filled out by the user it won't show up again? I'm not 100% sure how this works with clicking the "back" button in the browser but it seems like it might be a more native way to prevent a field that's already filled out from getting re-submitted with a different value?

 

Here's an article from the Adobe Docs: 
Configure Form Progressive Profiling
https://experienceleague.adobe.com/docs/marketo/using/product-docs/demand-generation/forms/form-acti...

Here's an article from the infamous TEKNKL blog that might paint some add'l context: 
Combining Progressive Profiling with (the equivalent of) Known Visitor HTML
https://blog.teknkl.com/combining-progressive-profiling-with-the-equivalent-of-known-visitor-html/

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Stop multiple form submissions from same user

(1) You don’t need to avoid the Forms 2.0 API here:

    if (form.getFormElem().find('[name="' + checkboxField + '"]').length > 0) {
      form.getFormElem().find('[name="' + checkboxField + '"]').prop('checked', true);
    }

Just check the getValues() as you do later on and use setValues().

 

It’s best practice to use the supported API methods when possible, otherwise results may be unpredictable.

SanfordWhiteman
Level 10 - Community Moderator

Re: Stop multiple form submissions from same user

(2) As Dave says, simply using Known Visitor HTML is a substitute for all of this. Just don’t include the Submit button in your Known Visitor HTML.

 

And in Admin » Field Management block fields from being updated via form fillout.

 

Naturally, you can’t stop people from clearing their cookies (which will reveal the form again) but you can stop them from being allowed to change the relevant fields.

alayton
Level 1

Re: Stop multiple form submissions from same user

Thank you both for all of your help! I think I was really overthinking it and ended up just going with Known HTML for now. My only issue is that while we're using this as a pre-qualification of sorts, things do change with someone's business and I'm concerned we'll be losing people that way. I think I could leverage the checkbox down the line and clear the value after a period of time, but don't have the capacity to get it to work at the moment! 

EllenSchwier
Level 5

Re: Stop multiple form submissions from same user

Another option is to set up your smart campaign that processes the form fills to have a Schedule that people can only run through the flow once. Not as great for the user experience but better for your sales team. 

alayton
Level 1

Re: Stop multiple form submissions from same user

I actually had that in place! It's a bit of a tough issue because we don't have the best back-end processes to properly support our sales department yet. Lots of bandaid solutions while we work on larger projects to help this!

 

Long explanation if you're interested: 

There are two ways in our system to create an SFDC lead record. Once you qualify through the form and once you create a free account. We use the form to pre-qualify leads before they create an account because once they create an account, an SFDC lead record is created and a sales rep gets involved. The reps were spending 75% of their day disqualifying people because they didn't meet the basic requirements. This form is mainly a barrier to entry, so if they qualify with the form logic, the record gets created in marketo, pushed to salesforce then they go to a page to create an account. The account creation just adds onto the marketo created record. If they don't, they get a message saying they don't qualify. People were getting disqualified, hitting the back button and changing their answers until they got the account creation button which still creates a salesforce record lol it was a bit of a mess. I ended up just going with the Known HTML to stop the second submission completely.