JavaScript TestImproved in 5.0+
JavaScript Test adds a hidden input with a value that Freeform’s frontend script clears. If the value remains when the form is submitted, the check fails. The check is disabled by default and is available in all editions, including Express since Freeform 5.9.
Set up the integration
Choose the default in Freeform Settings
Go to Freeform → Settings → Integrations → Spam Blocking → JavaScript Test. Turn on Enabled by default to apply the check to forms that have no saved override, then click Save.
Enable and test it on your form
Open your form in the builder and go to Integrations → Spam Blocking → JavaScript Test. Enable the integration and save the form. Test a normal submission while signed out to confirm Freeform’s scripts are running on the page.
Settings
- Custom Input Name
- Use this to rename the hidden input. The default is
freeform_check.
- Use this to rename the hidden input. The default is
- Custom Error Message
- Enter the message to show when the JavaScript check fails and Spam Protection Behavior is set to Display Errors.
Choose a custom input name browsers are unlikely to autofill. A name such as email_address2 could lead to legitimate submissions being flagged.
Templating
Freeform inserts the hidden input automatically when it renders the form. If you load scripts manually, make sure you load Freeform’s frontend scripts on the page. For a custom REST frontend, see the REST API security metadata. Freeform skips this check for GraphQL submissions.