---
title: "Creating conditional fields"
date: "2024-02-14T06:18:38+00:00"
summary: "Learn how to create dynamic, user-responsive forms with conditional fields in Campaign Studio. Enhance your marketing campaigns by displaying relevant options based on user selections."
image:
type: "page"
url: "/campaign-studio/creating-conditional-fields"
id: "6703afa3-0ccb-4b54-972f-74e7d48e43b2"
---

Campaign Studio allows you to create conditional fields. Conditional fields allow you to manage sets of dependencies between fields. Such fields are available for editing and display only if the right condition is met.

To create conditional fields, you must first [create custom fields](#custom-fields) and then [leverage such fields in forms](#create-forms).

Creating custom fields
----------------------

Let us take an example wherein you want to display specific menu items to customers based on the selected cuisine. To achieve that, you can create the following custom fields:

*   **Favorite Food**: This field should be of the **Select** data type. Let us assume that available options for this field are **American**, **Asian**, **Italian**, and **Latin American**.
    
*   **American Food**: This field should be of the **Select - Multiple** data type. Let us assume that available options for this field are **Apple Pie**, **Burgers**, **Fried Chicken**.
    

For more information on creating custom fields, see [Create custom fields](../../settings/custom-fields.html#create-custom-field).

Creating forms
--------------

Once you have created the requisite custom fields, you must create a form with those fields. For more information on creating forms, see [Forms](/campaign-studio/components/forms/create-a-form#create-form).

While creating forms, ensure that you follow the below process for associating the custom fields with the form:

1.  Add a field to the form. This field can be of **Select**, **Select -** **Multiple**, or **Boolean** data types. This field can act as the parent field.
    
2.  Specify the values in all the tabs, as appropriate.
    
    ![Creating forms - General](https://acquia.widen.net/content/xnvkleyjl7/jpeg/campaign-studio_creating-forms-general.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    
    ![Creating forms - properties](https://acquia.widen.net/content/xa9ul98rpw/jpeg/campaign-studio_creating-forms-properties.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    
3.  Once the field is saved, click **Add field based on selected value** which appears beneath the field, and select **Checkbox group**.
    
    ![Creating forms and adding fields](https://acquia.widen.net/content/uruyahbgcx/jpeg/campaign-studio_creating-forms-adding-fields.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    
4.  Enter the values in the **General** tab. For more information, see [General](/campaign-studio/components/forms/create-a-form#field-editor-general).
    
5.  Under the **Condition** tab, select one of the following options and the corresponding values:
    
    *   **including**: Select this option if you want the conditional field to appear only if the selected value on the form matches one of the selected values that you have configured in the conditional field editor.
        
    *   **excluding**: Select this option if you want the conditional field to appear only if the selected value on the form does not match with any of the selected values that you have configured in the conditional field editor.
        
6.  To ensure that the conditional field appears only after a response is selected for the parent field, set the **Any value** option to **No**. This is regardless of the value specified in response.
    
    ![Adding conditions](https://acquia.widen.net/content/v3m9hfukke/jpeg/campaign-studio_adding-conditions.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    

Tip

For a parent field with the **Select** data type, Campaign Studio recommends that you use an **Empty Value**.