WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
[resolved] How to add non selectable fields in a drop-down (2 posts)

  1. suite8
    Member
    Posted 1 year ago #

    Hey there,

    I'm using CF7 and I need to have a dropdown with a non selectable category "header"

    such as

    US States
    AL
    AK
    AR...etf
    Countries
    Afganistan
    Albania etc....

    With "US States" and "Countries" not an option to submit.

    Thanks

    http://wordpress.org/extend/plugins/contact-form-7/

  2. suite8
    Member
    Posted 1 year ago #

    I solved the problem myself if anyone has the same issue

    I used JQuery and gave the options I wanted to make non-selectable an empty value.

    $("option:nth-child(1), option:nth-child(1)").val("");
    $("option:nth-child(1), option:nth-child(53)").val("");
    });

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic