WordPress.org

Forums

User Meta Manager
[resolved] Validation - An invalid form control with name='xxxxx' is not focusable. (3 posts)

  1. FayssalF
    Member
    Posted 11 months ago #

    I have set up a custom meta (a drop down list / Select menu) and made it required.

    Everything worked fine but suddenly validation stopped working properly. The submit button became unclickable in both Chrome and Opera.

    When I chech the developer console (F12) I get the following error :

    An invalid form control with name='xxxxx' is not focusable.

    I have tried different solutions but it seems that the only one working is to add a novalidate to the register form tag. However, that cannot be considered a solution since I want the select menu to be required and validated.

    https://wordpress.org/plugins/user-meta-manager/

  2. President McCheese
    Member
    Plugin Author

    Posted 10 months ago #

    Hi,

    I haven't been able to reproduce this error yet.

    If you view the source code for the form, check to see if the form "id" attribute matches the "form" attribute for the select menu.

    Example:

    <form name="registerform" id="registerform" action="wp-login.php?action=register" method="post">
    id="registerform"

    <select name="test_select" class="test-class" required="required" data-test="1" size="1" form="registerform">
    <option value="" selected="selected">Select One</option>
                <option value="finance">Finance</option>
                <option value="sales">Sales</option>
                <option value="management">Management</option>
                </select>

    form="registerform"

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been damaged by the forum's parser.]

  3. President McCheese
    Member
    Plugin Author

    Posted 10 months ago #

    I've learned this may be a bug in Chrome and Opera that can occur when CSS "display:none" is used on form elements.

Reply

You must log in to post.

About this Plugin

  • User Meta Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags