Title: Conditional &#8211; Contact Form 7
Last modified: August 30, 2016

---

# Conditional – Contact Form 7

 *  [abeygroup](https://wordpress.org/support/users/abeygroup/)
 * (@abeygroup)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/conditional-contact-form-7/)
 * Hi Everyone,
 * This is my first post and also fairly new to WordPress in general. I am helping
   out my cousin who own a medical center. I started on this form below but I was
   wondering if anyone could help me with making a conditional form.
 * If a patient selects:
    Between 8AM – 12PM Between 12PM – 3PM or Between 3PM –
   5PM I would like only the morning doctors to show up. However, when selecting
   Between 6PM – 10PM I would like the evening doctor to show up.
 * Is this at all possible in Contact form 7?
 * Please see code below, any help/advise/suggestion is much appreciated.
 * <h2 class=”text-divider-double”>Your Personal Details</h2>
    <p>First Name (required)[
   text* your-fname] </p>
 * <p>Last Name (required)
    [text* your-lname] </p>
 * <p>[radio NewExisting “New Patient” “Existing Patient”]</p>
 * <h2 class=”text-divider-double”>Contact Details</h2>
 * <p>Phone Number 
    [tel* Phone]</p>
 * <p>Your Email (required)
    [email* your-email] </p> <h2 class=”text-divider-double”
   >Appointment Details</h2>
 * <p>Preferred Date
    [date* date placeholder “Date”] </p>
 * <p>Preferred Time
    [select PreferedTime placeholder “Preferred Time” “Between
   8AM – 12PM” “Between 12PM – 3PM” “Between 3PM – 5PM” “Between 6PM – 10PM”]</p
   >
 * <p>Preferred Doctor
    [select PreferedDoc placeholder “Preferred Doctor” “Dr Morning
   1” “Dr Morning 2” “Dr Morning 2” “Dr Evening 1”]
 * <p>[submit “Send”]</p>
 * [https://wordpress.org/plugins/contact-form-7/](https://wordpress.org/plugins/contact-form-7/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [abeygroup](https://wordpress.org/support/users/abeygroup/)
 * (@abeygroup)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/conditional-contact-form-7/#post-6394977)
 *  [Neil Murray](https://wordpress.org/support/users/buzztone/)
 * (@buzztone)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/conditional-contact-form-7/#post-6395153)
 * This sort of conditional logic is not available directly in Contact Form 7. It
   can be done via custom programing but you would need to be rather skilled at 
   WordPress development using PHP and/or jQuery.
 * Some of the premium Form plugins do offer some Conditional Logic including [Gravity Forms](http://www.gravityforms.com/)
   and [Ninja Forms](http://wpninjas.com/).
 * See also [https://wordpress.org/support/topic/plugin-contact-form-7-this-is-how-to-showhide-fields-with-jquery​](https://wordpress.org/support/topic/plugin-contact-form-7-this-is-how-to-showhide-fields-with-jquery​).
 *  Thread Starter [abeygroup](https://wordpress.org/support/users/abeygroup/)
 * (@abeygroup)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/conditional-contact-form-7/#post-6395157)
 * Thank you for that buzztone. That is actually very helpful.
    So I guess a work
   around would be – creating 2 different drop down boxes which are hidden and depending
   what is clicked, I could show the drop down box with the appropriate doctor. 
   Would you agree?
 *  [Neil Murray](https://wordpress.org/support/users/buzztone/)
 * (@buzztone)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/conditional-contact-form-7/#post-6395189)
 * There a several different ways to do this if you use jQuery. My preferred way
   would be to have a single dropdown & change the contents (using jQuery) based
   on the selected item.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Conditional – Contact Form 7’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

 * [conditional form](https://wordpress.org/support/topic-tag/conditional-form/)

 * 4 replies
 * 2 participants
 * Last reply from: [Neil Murray](https://wordpress.org/support/users/buzztone/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/conditional-contact-form-7/#post-6395189)
 * Status: not resolved