Support

Account

Home Forums Bug Reports JavaScript errors on saving ACF post 'An invalid form control is not focusable.'

Solving

JavaScript errors on saving ACF post 'An invalid form control is not focusable.'

  • I have over the last months experienced a problem with ACF that until now I was not able to understand but I have at last tracked down.

    The problem I have sometimes experienced is that upon submitting to update an existing post using ACF fields the page doesn’t actually post.

    I suddenly realised this occurs because the page has had a fatal Javascript error upon submitting. The errors are like this: An invalid form control with name=’acf[field_551ab2d0f904f]’ is not focusable.

    The problem seems to relate to fields within a tabbed page of properties and the problem fields not being in the currently visible tab at the moment of form submission/update.

    To give you a specific example that you can use to replicate the problem….

    1) Setup a number field and add a min/max number range to it. Put this property within a collection of ACF fields split between multiple tabs.
    2) Create/edit a post and add a number to that number field OUTSIDE of the range you allowed for.
    3) CLick into another tab so that the problem field is not visible on screen
    4) submit the post for saving.

  • Hi @arkid77,

    Thanks for the post.

    I have just tried to replicate this issue on the latest version 5.3.7 but the page seems to load fine and save the posts.

    It is safe to assume that the bug was fixed on an earlier version.

  • I run into exactly the same issue. It looks like safari has it’s own validate behaviour.

    How did you resolve the issue?

    WordPress 5.6.2
    ACF Pro 5.9.5

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘JavaScript errors on saving ACF post 'An invalid form control is not focusable.'’ is closed to new replies.