• Resolved Mayhem30

    (@mayhem30)


    How do I add “tabindex=”5” to the checkbox field?

    When I manually try to add the input field in the “Custom HTML” box, it gets removed when I press the “Save Changes” button.

    (eg) <input type=”checkbox” name=”subscribe-reloaded” id=”subscribe-reloaded” value=”replies”>

Viewing 1 replies (of 1 total)
  • Thread Starter Mayhem30

    (@mayhem30)

    Nevermind, I managed to solve the issue.

    I turned off “Enable default checkbox” and recreated it in “comment_form_default_fields” filter.

    In case anyone else is looking for this solution, this is what I’ve done :

    function my_comment_form_fields($args) {
    $args['comments_notify'] = '<div class="comment-form-subscriptions">
    	<input type="checkbox" name="subscribe-reloaded" id="subscribe-reloaded" tabindex="5" value="replies">
    	<label for="subscribe-reloaded">Notify me of replies to my comment via e-mail.</label>
    	</div>';
    return $args;
    }
    add_filter('comment_form_default_fields', 'my_comment_form_fields');
Viewing 1 replies (of 1 total)
  • The topic ‘Add “tabindex” to checkbox field?’ is closed to new replies.