Protect your Ontraport form from bots
In short: To stop spam on an Ontraport form, build it as a Smart Form, copy its code from Publish › HTML Version, run it through the SpamKill Setup Wizard and paste the protected code on your page. SpamKill checks every submission without a CAPTCHA and real contacts still reach Ontraport. It takes about 15 minutes.
Bots are filling your Ontraport forms with fake contacts. Protect an Ontraport Smart Form with SpamKill and real contacts keep arriving in Ontraport, on your own thank-you page if you set one. ONTRAforms run on Ontraport's script, so this guide uses a Smart Form's HTML Version.
- About 15 min
- 7 steps
- Copy and paste one snippet
Last verified on Ontraport (trial, Smart Form HTML Version) with the SpamKill Setup Wizard
What changes, and what doesn't
- Submissions still arrive in Ontraport as contacts
- Your form's fields, styling and thank-you page
- Ontraport's form script and its tracking
- Every submission is checked before it reaches Ontraport
- No CAPTCHA for your visitors
- Undo it anytime by putting your old form code back
Before you start
Have these ready so nothing stops you halfway.
- A SpamKill accountNo account yet? Start a free trial.
- Admin access to OntraportStep 1 changes a setting under Administration, so you need to be the account owner or an admin.
- A way to edit your page's HTMLYou'll paste HTML code, so use an HTML or code block in your site editor.
Quick setup
For returning users. Each line links to its full step.
- Open Administration › Security and turn off Disable Custom HTML Forms. Step 1
- Open Forms, click New Form and choose Smart Form. Add any fields you need, then under Settings choose Custom URL, enter your thank-you page and click Save. Step 2
- Click Publish, open the HTML Version tab and copy all the code in the box. Step 3
- In the SpamKill Console, open Setup Wizard, click No to the WordPress question and paste the code. Step 4
- Check the email field is email, click Generate Protected Code, then click Yes, protect my form. Step 5
- Copy the protected code, paste it where the form should go, publish the page, then click Next. Step 6
- Submit [email protected] and expect an error, then submit a real address and check Contacts. Step 7
Allow HTML forms
Where: OntraportYour accountAdministrationSecurity
In Ontraport, click the account icon at the top right and choose Administration. Open the Security tab and turn off Disable Custom HTML Forms (1). This lets Smart Forms give you their HTML code, which SpamKill needs. SpamKill then checks every submission before it reaches Ontraport.
You should see: The Disable Custom HTML Forms switch is grey.
Create a Smart Form and set its thank-you page
Where: OntraportForms
Open your Forms list and click New Form (1). Choose Smart Form (2), not ONTRAform. Your new form starts with First Name, Last Name and Email. To ask for more, click Add Field (3). Then click Settings at the top (4). Under Opt-in settings, Send contacts here, choose Custom URL (5) and enter the full address of your thank-you page, or leave Use Default Thank You page chosen to show Ontraport's own page. Click Save (6).
You should see: Your thank-you page's address next to Custom URL, saved.
Already have a Smart Form?
Open it from the Forms list, check its thank-you page under Settings and go on to step 3. An ONTRAform can't be used: build the same fields as a Smart Form.
Copy the HTML Version
Where: OntraportFormsYour formPublish
Click Publish at the top and open the HTML Version tab (1). Click in the box of code (2), select all of it and copy it.
You should see: The form code on your clipboard. It starts with <link rel="stylesheet".
Does the HTML Version say This Feature Is Disabled?
Disable Custom HTML Forms is still on. Turn it off as in step 1, then open Publish again.
Paste it into the Setup Wizard
Where: SpamKill ConsoleSetup Wizard
In the SpamKill Console, click Setup Wizard in the sidebar. If your site isn't on WordPress, click No under Is your website developed in WordPress?. Paste the Ontraport code into the box (1).
You should see: Tips under the box, the email field, then Generate Protected Code.
Generate the protected code
Where: SpamKill ConsoleSetup Wizard
Under the tips, check the email field is email (1) and click Generate Protected Code (2). SpamKill asks you to check the email field once more. Click Yes, protect my form (3).
You should see: Replace the existing code with this code on your website, above your protected code.
Put the code on your page
Where: Your website editor
Copy the protected code. Open your page in your website editor and paste the code where the form should go, replacing any old Ontraport form code. Save and publish the page. Then click Next in the wizard. The code keeps Ontraport's form script, so leave it in.
You should see: Your page shows the form's fields and a Submit button.
Does your site style the form by field name?
SpamKill renames the fields, and the wizard lists the old and new names. Update any CSS or scripts that point at the old names. Ontraport's own styling uses the form's classes, which SpamKill keeps.
Test it twice
Open your page in a private window. Submit the form with [email protected] (1). Then submit it again with an address you can recognise. You land on your thank-you page, and the contact appears under Contacts with the name you entered (2).
The first try shows That email address doesn't look right.
The second try appears under Contacts, with the name you entered.
Back in the wizard, click Both Tests Passed.
You should see: Your thank-you page after the second try, or Ontraport's default thank-you page if you didn't set one.
Your Ontraport form is protected
- Bots are stopped before they reach Ontraport.
- Real leads arrive exactly as before, with no extra steps for them.
- Every block is logged in your SpamKill dashboard.
Something not working?
Find what you're seeing.
There's no HTML code, only a script
You're on an ONTRAform, or Disable Custom HTML Forms is still on. Use a Smart Form and turn the setting off under Administration › Security.
Visitors see Ontraport's thank-you page instead of mine
Open the form, go to Settings, choose Custom URL under Send contacts here, enter your page and click Save. You don't need to change the code on your page.
The form submits, but no contact appears in Ontraport
Check the live page has the protected code: its form sends to protect.spamkill.dev. The Contacts list can also take a reload to show new contacts.
A real visitor was told their email doesn't look right
SpamKill checks for missing @ symbols, extra spaces and common typos. The visitor can click Go back to the form, fix the address and send again.
I added fields to the form later
Copy the code from Publish › HTML Version again, repeat steps 4 to 6 and replace the code on your page.
Changed your mind? Undo in under a minute
- Open the page in your website editor.
- Delete the SpamKill code and paste your original Ontraport form code back.
- Save and publish the page. Your form is back to how it was.
Thanks! Glad your form is protected.
Sorry about that. Tell us which step tripped you up and we'll fix the guide.
Stuck? We'll set it up with you.
Free setup help for every plan. Send us a message and we'll walk through your Ontraport form with you.
Get setup help