Document – Chained Selects for WPForms

Chained Selects allow you to create dependent dropdown fields in WPForms. When the user selects an option in the first field (Parent), the second field (Child) will dynamically update to show only the relevant options.

This is useful for:
• Categories → Models
• Country → Cities
• Product Type → Product Names
• Brand → Models
• Any parent-to-child selection logic

Table of contents:

1. Creating a Chained Select Field in WPForms

This step is required for all data sources.

Go to WPForms → Add New

Create a new form or edit an existing one

Drag the Chaines Select Dropdown field into the form

Click the field to open Field Options

Choose Data Source:

  • Manual: loads options directly inside the form builder
  • CSV File: loads options from a CSV file (for example, a file with columns: make, model, year).
  • Database: loads options directly from a database table.
  • Google Sheets: data is loaded from a live web source

Set the condition to link parent → child

Creating a Chained Select Field in WPForms

In this doc, we use an example dataset :

Category: Phone, Laptop, Tablet (parent field)

Models per Category (child field):

  • Phone → Pixel 6, iPhone 14, Galaxy S22
  • Laptop → MacBook Air, Dell XPS 13, ThinkPad X1
  • Tablet → iPad Air, Galaxy Tab S8, Surface Go

2. Manual Data Input

Best for small, static datasets that rarely change.

Step 1: Create a Category field (parent)

Create a chained select field named Category.

Choose Manual as Data Source

Typing the options: Phone, Laptop, Tablet

Create a chained select field named Category.

Step 2: Set up Model field (child)

Create a chained select field named Model.

Choose Manual as Data Source

Now we need to tell the plugin how to filter the models based on the selected category. We do that using a Where condition.

Steps:

1. In the Model field, scroll to the Where section.

2. Click Add Where.

3. Fill in the condition:

Column: Phone

Operator: =

Field ID: 3 (ID of Category field)

4. Enter the values

5. Do the same way for Laptop and Tablet

Create a chained select field named Model

Step 4: Save your form and test it on the frontend.

Phone → Pixel 6, iPhone 14, Galaxy S22
Laptop → MacBook Air, Dell XPS 13, ThinkPad X1
Tablet → iPad Air, Galaxy Tab S8, Surface Go

3. Chained Select Using a Database Table

In Database Mode, your chained select options are loaded directly from a table inside your WordPress database. This is great when you have a large dataset or your data changes often.

Step 1: Prepare Your Database Table
Create table wp_chained_data (or any name).

Example structure:

id | category | model

Step 2: Configure Parent Field (Category)

Create a field named Category.

Set Source: Database Table.

Table name: wp_chained_data

Database Column: Enter the column name containing the category values: categories

Set Source: Database Table.

Step 3: Configure Child Field (Model)

Create a field named Model.

Source: Database Table.

Table name: wp_chained_data

Database column: this column contains the child/related values: model

Now we need to tell the plugin how to filter the models based on the selected category. We do that using a Where condition.

Steps:

1. In the Model field, scroll to the Where section.

2. Click Add Where.

3. Fill in the condition:

Column: categories

Operator: =

Field ID: 3 (Category field)

This rule means: Show only database rows where the categories column matches the value selected in the Category field.

Chained Select Using a Database Table

Step 4: Save your form and test it on the frontend.

The Model dropdown dynamically loads models based on the selected Category.

4. Chained Select Using a CSV File

This mode loads the chained options from a CSV file. Recommended for large datasets.

Step 1: Prepare Your CSV File
Create a CSV with two columns:

categories,model
Phone,Pixel 6
Phone,iPhone 14
Phone,Galaxy S22
Laptop,MacBook Air
Laptop,Dell XPS 13
Laptop,ThinkPad X1
Tablet,iPad Air
Tablet,Galaxy Tab S8
Tablet,Surface Go

Step 2: Upload the CSV File
You can:
• Upload to Media Library → copy file URL
• Or host it externally and paste the link

Step 3: Configure Parent Field (Category)

Choose Data Source → CSV

Paste the file path or URL.

Column: type the column name that matches the parent values:categories.

Choose Data Source → CSV

Step 4: Configure Child Field (Model)

Chained Select tab → Source: CSV File.

Paste the same file path or URL.

Column: type the column name that matches the child values:model

Then we tell the plugin how to filter the CSV data using the ‘Where’ condition.”

Steps:

1. In the Model field settings, scroll to the Where section.

2. Click Add Where.

3. Fill out the fields like this:

Column: categories

Operator: =

Field ID: 3 (Category Field)

Meaning of this rule: Only show rows where the parent column matches the value selected in the Category field.

Chained Select Using a CSV File

Step 5: Save your form and test it on the frontend.

5. Chained Select Using Google Sheets

Google Sheets works the same way as CSV — but the data is loaded from a live web source.

Step 1: Prepare your Google Sheets

Open the sheet

Click Share.

Set access to Anyone with the link.

Copy the link.

Step 2: Configure the Category Field

Source: Google Sheet.

Paste your share link.

Column: categories.

Chained select data Source: Google Sheet.

Step 3: Configure the Model Field

Source: Google Sheet.

Paste your share link.

Column: categories.

Then we tell the plugin how to filter the sheet data using the ‘Where’ condition.”

Steps:

  1. In the Model field settings, scroll to the Where section.
  2. Click Add Where.
  3. Fill out the fields like this:

Column: categories

Operator: =

Field ID: 3 (Category Field)

Meaning of this rule: Only show rows where the parent column matches the value selected in the Categories field.

Chained Select Using Google Sheets

Step 4: Save your form and test it on the frontend.

Phone → Pixel 6, iPhone 14, Galaxy S22
Laptop → MacBook Air, Dell XPS 13, ThinkPad X1
Tablet → iPad Air, Galaxy Tab S8, Surface Go