CSRF Token Protection

Protects against cross-site request forgery (CSRF) attacks by ensuring that each form submission includes a valid security token.

CSRF Token Protection

The CSRF token check makes every form submission prove it came from a page on your site. When it's on, Convert Forms only accepts a submission if it carries the visitor's Joomla security token, and it rejects everything else before any of your form's tasks run.

How it works

Joomla gives every visitor session a unique security token, also known as a CSRF token. When the check is on, Convert Forms reads that token from each submission and compares it with the visitor's session. It checks the same token on the requests some fields send in the background, like file uploads.

Many spam bots never load your page. They send their data straight to the form's submission URL, so they have no valid token, and the check blocks them.

The check is off by default and applies to every form on your site.

Enable the CSRF token check

  1. Log into your Joomla backend.
  2. Go to Components → Convert Forms.
  3. Click Options in the top-right toolbar.
  4. Open the Security tab.
  5. Set Use Joomla! CSRF Token to Yes.
  6. Save.

Then submit a test entry from the front end to make sure the form still works.

If your site uses full-page caching, like Joomla's Page Cache plugin or a proxy such as Cloudflare or Sucuri that caches whole pages, visitors can get a cached page that holds someone else's token. Their submissions then fail with an invalid security token error. Test the form after enabling the check, and see the troubleshooting section below if it fails.

Troubleshooting

Visitors see an invalid security token error

The message The most recent request was denied because it contained an invalid security token means the token in the submission didn't match the visitor's session. It usually happens because:

  • The Session Lifetime in Joomla's Global Configuration is too low, so the session expires while the visitor is still filling in the form. Raising it means fewer invalid token errors for real visitors.
  • Joomla's Page Cache plugin is enabled. In most cases, disabling it fixes the error.
  • You load the form with a module while Joomla's cache is on. Disable the module's Caching option.

If none of these helps, turn the check off again:

  1. Log into your Joomla backend.
  2. Go to Components → Convert Forms.
  3. Click Options in the top-right toolbar.
  4. Open the Security tab.
  5. Set Use Joomla! CSRF Token to No.
  6. Save.

For other ways to stop spam, see Troubleshooting Spam Submissions.

Last updated on Nov 6th 2026 09:11