WordPress.org

Forums

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

  1. Rene Hermenau
    Member
    Posted 10 months 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.

    Thanks

    https://wordpress.org/plugins/contact-form-7/

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 10 months 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
    Member
    Posted 10 months 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:-)

    Thanks

Reply

You must log in to post.

About this Plugin

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

About this Topic