SOLVED

Required terms & condition checkbox

Go to solution
Anonymous
Not applicable

Required terms & condition checkbox

Hi, 

I have a form with a terms and condition checkbox on there, that I would like to be checked before one is able to continue and submit the form. I've read about a piece of javascript that needs to be added to the landing page, but the link was dead. Does someone has this piece of javascript?

Many thanks in advance!

Ruud
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Required terms & condition checkbox

I'd recommend checking the Resources tab as a lot of articles that moved there.  

You may find that article here: http://community.marketo.com/MarketoResource?id=kA650000000Gtt6CAC 


View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Re: Required terms & condition checkbox

Great Question Ruud - I am interested in hearing the same answer.

taylor
Anonymous
Not applicable

Re: Required terms & condition checkbox

Anonymous
Not applicable

Re: Required terms & condition checkbox

I was thinking of doing something similar, and you just saved me some time! Thanks Jason!
Anonymous
Not applicable

Re: Required terms & condition checkbox

Hi Jason, 

many thanks! However, I tried everything I could think of and I can't get it to work. I replaced the form ID (in my case 259) and the field (in my case "Interested_in_Newsletter__c" ). I put the code in <script> brackets and put a custom html on the landing page. 

Do you happen to have any idea where I got it wrong?

Thanks again!



<script type="text/javascript">
 
$('#mktForm_259').attr('onSubmit','return validate_form ( );');
 
function validate_form ( )
{
valid = true;
 
        if ( document.mktForm_259.Interested_in_Newsletter__c == false )
        {
                alert ( "Please check the Terms & Conditions box." );
                valid = false;
        }
 
        return valid;
}
 
</script>
Anonymous
Not applicable

Re: Required terms & condition checkbox

If you're using the built in Marketo jQuery, try changing the "$" to "$jQ". If that doesn't work, please provide your landing page URL and we'll get to the bottom of it 🙂
Anonymous
Not applicable

Re: Required terms & condition checkbox

I'd recommend checking the Resources tab as a lot of articles that moved there.  

You may find that article here: http://community.marketo.com/MarketoResource?id=kA650000000Gtt6CAC 


Anonymous
Not applicable

Re: Required terms & condition checkbox

Hi Jason and JT, 

many many thanks! The code on the resource article did the trick!

Thanks again!

Ruud


Anonymous
Not applicable

Re: Required terms & condition checkbox

Hi all,

Sorry to jump in to this discussion but figured it's best to do so here than starting a new discussion.  I am having trouble getting the checkbox to work.  I've implemented the code as discussed above but somehow it's not work.  The URL for my landing page is as follows:

https://info.magento.com/ProUpsellTesting.html 

Can someone confirm if I've coded something incorrectly?  I don't have experience with JS code so this is all new to me.

Thanks in advance for your help!

Sandra