Contact Form 7
[resolved] How to create label for attribute for styling checkboxes (3 posts)

  1. Rene Hermenau
    Posted 1 year ago #

    I need a label for attribute like
    <label for="mycheckbox"></label>
    <input type="checkbox" value="1">

    Is this possible? May i suggest an option in the cf7 admin settings to create such a label?

    Without a label "for" attribute i can not css style my checkboxes.



  2. Takayuki Miyoshi
    Plugin Author

    Posted 1 year ago #

    It's not possible because each <input type="checkbox" /> doesn't have id attribute. You should be able to style labels without for attributes.

  3. Rene Hermenau
    Posted 1 year ago #

    AFAIK styling checkboxes without label fields and "for" attribute is not possible. But its not a problem any longer for me, i wrote a action_hook which changed the way cf7 handles checkbox fields, so now i am happy to say that it works:-)


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic