Using Hidden Fields with Dropdown Menu Option
-
I was wondering how I would go about using the hidden fields feature that Contact Form 7 Modules provides with drop-down menus. What I am trying to do is when someone selects a specific option in the drop-down list, a hidden field will appear. I only want the hidden field to appear if this particular option in the drop-down menu is selected. Could someone point me in the right direction?
Thanks! π
-
Hello? Anyone? I really need to do this some how…
Use Gravity Forms instead. CF7 doesn’t support conditional fields.
Zack Katz, okay! Thanks, I will look into Gravity Forms and I may change over to that plugin and use it instead of Contact Form 7.
Thanks again! π
Um……I just went to Gravity Form’s official website (http://gravityforms.com) and it turns out that you have to pay for it (starting at $40). Is there any other contact forms plugins that are FREE that include the functionality that I require?
I’m going to go out and find some other contact form WP.org plugins that have conditional fields…..hopefully I can find one that will be free… π
@yodaman – Gravity Forms is the best contact form plugin for WordPress. Trust me on that one π It’s worth $39; consider the amount of time you’ve spent looking!
Try using the coupon SEODenver for some $$ off.
@zack Katz – Okay! I might just keep on using CF7 as I don’t really want to pay any money…thanks for all your help, though! π
Well I was looking for the same thing, and thought this might help other people out.
It may not be the most cleat of code but it works.
First I have a form with 5 things to pick from, when the first three are picked I want box 1 to show and when the last two are picked I want box two to show.
So I made two divs that are displayed none in the norm and added in the needed text boxes. π
So now they are hidden
Then I added this code.
$(function() {
$.viewMap = {
‘Event Planners’ : $(‘#thirtyoff’), ‘Videographer’ : $(‘#thirtyoff’), ‘Photographer’ : $(‘#thirtyoff’),
‘Teachers’ : $(‘#tenoff’), ‘Union Workers’ : $(‘#tenoff’)
};
$(‘#AreYouA’).change(function() {
// hide all
$.each($.viewMap, function() { this.hide(); });
// show current
$.viewMap[$(this).val()].show();
});
});——–
Event Planners, Videographer,Photographer are the values for the first three “#thirtyoff” is the id for the box that is displayed none, that I want to show when one is pickedTeachers,Union Workers are the last two values in the drop down and “#tenoff” is the id of the box that is displayed none that I want to show when they are picked.
———
Well I hope this helps someone else, and I am with Nathan, I like supporting devs but $199 is a little hight of a price. And yes I know its not $199 for one site, but I pick a form and stick with it, so all the sites I build are the same and it makes support easy.
But if you ever make an addon that will make Contact Form 7 better and it cost, I will pick it up.
To me, its a matter of price and learning a all now contact form when 90% of the time this ones does a great job.
The topic ‘Using Hidden Fields with Dropdown Menu Option’ is closed to new replies.