• Hello Sir,
    I have to add a custom attribute in select tag for fix w3 validator issue.
    Ex:

    <select role=”signup”>
    <option>1</option>
    <option>1</option>
    <select>

    Like above I have to add “role”(custom attribute), how can I add in contact form 7 ?

    Thanks
    Raj

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Thread Starter rajkakadiya

    (@rajkakadiya)

    Hi Rakayuki,

    Thanks for your reply.

    I have already tried but it’s not working for me, let me show you what i have tried

    add_action( ‘wpcf7_init’, ‘wpcf7_add_form_tag_text’ );

    function wpcf7_add_form_tag_text() {
    wpcf7_add_form_tag(
    array( ‘text’, ‘text*’, ’email’, ’email*’, ‘url’, ‘url*’, ‘tel’, ‘tel*’,’select’,’select*’ ),
    ‘wpcf7_text_form_tag_handler’,
    array( ‘role’ => true )
    );
    }

    [select menu-439 role:signup “first” “second”]

    • This reply was modified 4 years, 7 months ago by rajkakadiya.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add custom attribute In select tag’ is closed to new replies.