Docs & Support

Learn about all the Formidable features and get support from our amazing customer success team.

frm_focus_first_error

Heads up! This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or third-party development.

Use the frm_focus_first_error filter to toggle off the behavior of the auto-focus that gets triggered on the first field with an error.

Since Formidable Forms 7.0, the default is false on a form that shows the clickable list of field errors, because the error message at the top of the form receives focus instead. To move focus back to the first field with an error on that form, turn off the list or its focus with the frm_focus_error_summary filter.

Usage

add_filter( 'frm_focus_first_error', '__return_false' );

Formidable Forms makes advanced site building simple. Launch forms, directories, dashboards, and custom WordPress apps faster than ever before.

Parameters

  • $focus_first_error (bool): Whether the first field with an error receives focus. The default is true, or false on a form that shows the clickable list of field errors.
  • $form (object|null): The form. It's null when Formidable sets the default for the whole page.

Examples

Learn where to put the code when adding a custom PHP function to your site.

Basic example

Use this code example to stop the first field with an error from receiving focus. You see the change on forms without the clickable list of field errors, or when frm_focus_error_summary turns off the summary's focus.

add_filter( 'frm_focus_first_error', '__return_false' );
Was this article helpful? *

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

In this article

    We have a small, but amazing team of dedicated people who are committed to helping you achieve your goals and project requirements.


    Copyright © 2026 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.

    Complete your purchase
    Don't forget your purchase!
    Complete Purchase
    Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms