gaurav mishra
gaurav mishra

Reputation: 21

Making contact form 7 dropdown mandatory

[select* menu-76 first_as_blank "How did you hear about us*" "Google  " "Recommendation " "Checkatrade" "Social Media" "Returning customer" "Seen us on the road" "Advert" "Prefer not to say"]

I have added * just after the select but why this field is not working as mandatory? Please help..

Upvotes: 2

Views: 11874

Answers (2)

iPraxa Inc
iPraxa Inc

Reputation: 556

You need to add include_blank option in dropdown(select box) in contact form 7. Code example.

[select* menu-76 include_blank "How did you hear about us*" "Google  " "Recommendation " "Checkatrade" "Social Media" "Returning customer" "Seen us on the road" "Advert" "Prefer not to say"]

Upvotes: 5

charan kumar
charan kumar

Reputation: 2157

You need to insert "first_as_label", not "first_as_blank"

you can use "include_blank", this will include a blank field

[select* menu-76 first_as_label "How did you hear about us*" "Google  " "Recommendation " "Checkatrade" "Social Media" "Returning customer" "Seen us on the road" "Advert" "Prefer not to say"]

Contact form 7 documentation here

Upvotes: 5

Related Questions