Support » Plugin: Contact Form 7 » How can i add label id, or class in checkbox/radio button?

  • Hi,

    I would like to add custom id, or class for the label or the input field (checkbox or radio button).

    Now the plugin is add simple label without any id or class. I’m use the use_label_element method in the email editor.

    Now i’m use one choose option. radiobutton01, radiobutton02.

    My problem: When i’m use the id:jegytipus method, it’s only add for the mail span, (wpcf7-form-control-wrap jegytipus) and i would like to add custom id, (or class) for radiobutton01, another id (or class) for radiobutton02.

    How can i do that?

    Thank You,
    Tamas

Viewing 3 replies - 1 through 3 (of 3 total)
  • Please supply all your input in the Form section of the CF7 interface (add as code or include as link to screenshots), plus a link to your form.

    This helps others to understand your actual problem and offer a possible solution.

    Hi,

    There’s a sample:

    <label> Név [text* your-name] </label>
    
    <label> Email [email* your-email] </label>
    
    [radio jegytipus use_label_element default:1 "Early bird|Early bird" "Kurzus jegy|Kurzus jegy" "Kedvezményes jegy|Kedvezményes jegy"]
    
    <label> Üzenet [textarea your-message] </label>
    
    [submit "Küldés"]

    And i would like to choose the jegytipus radiobutton, with javascript. That’s the reason, why i would like to add custom class or id for the radio buttons.

    I would like to add custom id, or class for the label or the input field (checkbox or radio button).

    If you add the custom id, or class to the label rather than the input field (checkbox or radio button), which is being added via a CF7 Tag, you can have greater control, because you are not depending on how CF7 adds custom classes to CF7 tags.

    You should then be able to target radiobuttons etc, within your jegytipus class using appropriate jQuery selection.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How can i add label id, or class in checkbox/radio button?’ is closed to new replies.