Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Triggering focus with labels?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #149677
    Noel Forte
    Participant

    Hi-
    This seems like an extremely simple question, but perhaps I misunderstand the functionality of <label>‘s.

    I have a set up similar to this:

    <label class="contact-labels" for="first-name">First Name</label>
    <span class="wpcf7-form-control-wrap first-name"><input type="text" name="first-name" value="" size="40" class="first-name" aria-required="true"></span>
    

    From what I understand, when you click on a label, focus jumps to the corresponding input field, however, with what I have above, that doesn’t happen.

    Is there something I’m missing?

    Any advice is appreciated,

    Noel

    #149679
    Alen
    Participant

    You need an id="first-name"

    http://codepen.io/alenabdula/pen/gtdnl

    #149680
    Noel Forte
    Participant

    Thank you!!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.