A Dropdown in Contact Form 7 Turned Into A Multi-Select Box | Contact Form 7 Tutorials Part 18

WordPress Tutorials - WPLearningLab
WordPress Tutorials - WPLearningLab
74.9 هزار بار بازدید - 7 سال پیش - Grab Your Free 17-Point WordPress
Grab Your Free 17-Point WordPress Pre-Launch PDF Checklist: https://wplearninglab.com/17-point-wp...

A Dropdown in Contact Form 7 Can Be Turned Into A Multi-Select Box A Dropdown in Contact Form 7 Turned I...

Download your exclusive 10-Point WP Security Checklist: http://bit.ly/10point-wordpress-harde...

To create a dropdown in contact form 7 the first thing you need to do is install and configure the contact form 7 plugin.  Here's a tutorial on how to do just that: Creating A Contact Form Using Contact...

Now you can head over to the CF7 editor by click on Contact (the new menu item on the left side of your WordPress admin).

Then click on the Edit link below the form you want to add a drop down to.

Inside the form editor, click where you want the drop down to appear in the form editor.  Now click on the dropdown button in the horizontal menu above the form editor.

That will open the dialog box to customize the drop down.

First, choose whether the dropdown will be required or not.

Next, add a description name for the drop down or select field. This is for your reference only. It won't be displayed on the site.

Next, enter the choices for the form.

If you click the "Allow multiple selections" box then you will create a selection element.  People will be able to hold down Control on Windows or Command on a Mac to make more than one selection.

If you don't click that box, then you'll create a drop down where people can select only one item.

You can also choose to create a blank for the first entry in the element.  CF7 just adds a set of dashes, which I don't find very helpful. I like to create my own entry for this, at the very top of the options list.

I usually use -- Please Select --

That at least tells visitors what I want them to do.

Lastly, you can choose an ID or Class for the dropdown to help you style it more easily with CSS.

When you're happy click on Insert Tag.  That will insert the tag for the dropdown where you clicked in the form editor earlier.

Now you'll need to add the dropdown data to the Mail tab so that the information is included in the email the plugin generates.

Click on the Mail tab.

Then copy the field from the horizontal list at the top of the mail tab. The name for the field will be the name that you gave it in the dialog box earlier.

Now click inside the email body field where you want to dropdown data to go and paste it in.  

Next, click on Save to save the new addition to your form.  Then test the form live to see if it works how you want.  Tweak it until you're happy.

I hope this information helps you! If you have any questions leave a comment below or ping me @WPLearningLab on Twitter.

--------------

If you want more excellent WordPress information check out our website where we post WordPress tutorials daily.

https://wplearninglab.com/

Connect with us:

WP Learning Lab Channel: http://www.youtube.com/subscription_c...

Facebook: Facebook: wplearninglab

Twitter: Twitter: WPLearningLab

Google Plus: http://google.com/+Wplearninglab

Pinterest: Pinterest: wplearninglab
7 سال پیش در تاریخ 1396/02/20 منتشر شده است.
74,977 بـار بازدید شده
... بیشتر