Use A Dropdown Field Choice to Submit the Form Automatically

Apr 16, 2024

3 Min. Read

Share URL

This page may contain affiliate links. Please read my disclaimer for more information.

Problem

This solution is handy if you need to redirect the user to a different page or website based on the selection made in a dropdown field and don’t want them to complete all fields in the form.

Let me explain the problem with a specific use case.

You have a general intake form, also known as a contact us form, and you have a specific intake form you want people to use to submit a request for a demo.

However, the problem is that people are not using the demo form; instead, they use the general contact form.

So the question is, can I redirect the user to the demo form if they select ‘demo’ in the ‘why are you contacting us’ field?

Solution

The short answer is yes, and there is more than one way to accomplish this. I will share two simple solutions in this help doc.

Option One – No Code

This solution uses all native Gravity Forms functionality and requires conditional logic, an HTML field, and a confirmation redirect.

Configuring the Form

  1. You need at least one dropdown field with a choice for Demo
  2. Conditional logic applied to all other fields to only show if Demo is not selected
  3. An HTML field with a message to be displayed only when (using conditional logic) the user selects Demo

Configuring the Confirmations

  1. A default confirmation, to be used when the user does not select Demo
  2. A custom confirmation, set up as a page or redirect to be used with the user selects Demo

See it in action

Option Two – With Code

This solution uses conditional logic, a confirmation redirect, and a jquery code snippet (provided below).

The form and confirmation setups will be the same, but there will be one difference: an additional HTML field to add the code snippet below.

Configuring the Form

  1. You need at least one dropdown field with a choice for Demo
  2. Conditional logic applied to all other fields to only show if Demo is not selected
  3. An HTML field with a message to be displayed only when (using conditional logic) the user selects Demo
  4. An HTML field with the modified code snippet below
<script>
jQuery(document).ready(function($) {
    // Replace 'input_X_Y' with the actual input ID of your dropdown
    $('#input_X_Y').change(function() {
        if ($(this).val() === 'Choice Value') { // Replace 'Choice Value' with the triggering value
            // Trigger form submission
            $(this).closest('form').submit();
        }
    });
});
</script>

Configuring the Confirmations

  1. A default confirmation, to be used when the user does not select Demo
  2. A custom confirmation, set up as a page or redirect to be used with the user selects Demo

See it in action:

Need More Help?

If you still need help, feel free to use the comments or chat options below.

If you have an active Gravity Forms license, you can also open a support ticket here.

Photo of author
About the Author
Chris Eggleston
Husband. Father of 4. Grandpa of 2. Chief Problem Solver exploring business systems, technology, AI & faith — helping people solve real problems. @mantiswp @chrisegg

Support Chris - Donate $5

Gravity Wiz Add-Ons

Advertisement

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

Related Post

Styling Gravity Forms Radio Buttons Like Toggle Switch

Problem I recently had someone ask if it was possible to style radio buttons like a toggle switch in Gravity...

Mar 17, 2026

4 min. read

Automatically Switch from a Registration Form to a Waitlist in Gravity Forms

This tutorial shows you how to automatically switch from a registration form to a waitlist form in Gravity Forms using entry limits or attendee tracking with a custom shortcode.

Sep 29, 2025

4 min. read

Using AI + Gravity Forms to Streamline Job Applications

Hiring is tough. Sorting through dozens, or even hundreds, of job applications is time-consuming, repetitive, and prone to human bias. That’s where combining Gravity Forms, Gravity Flow, and AI automation comes in.

Sep 26, 2025

2 min. read

Turn Gravity Forms Image Choice Field into carousel

Problem Recently, I saw a Gravity Forms user looking for a way to style the new Image Choice field. Specifically,...

Jul 14, 2025

3 min. read

Offer Subscription With One-Off Add-On Product Options with Gravity Forms

Want to offer a subscription + one-time add-ons in Gravity Forms? Here’s how to do it using Stripe’s setup fee feature in a single payment feed.

Mar 24, 2025

2 min. read

Gravity Forms A/B Split Testing

Problem We recently received an interesting request from a Gravity Forms user who wanted to know how to do A/B...

Mar 21, 2025

5 min. read