Thanks to visit codestin.com
Credit goes to docs.fluentforms.com

Skip to content

Chained Select Field

The Chained Select in Fluent Form is a powerful feature that allows you to create dependent dropdowns from CSV data that dynamically populate a set of select elements based on the previous selection. It is particularly useful for creating category-based selection forms, such as Country State City or Make Model Variant selections.

This guide will walk you through adding and customizing the Chained Select field in Fluent Forms.

NOTE

The Chained Select field requires Fluent Forms Pro. See Upgrade to Fluent Forms Pro Add-on.

Adding a Chained Select Field

Go to Forms from the Fluent Forms navbar, select the form you want to edit, and click Edit to open the form editor.

NOTE

If you do not have any existing forms, read Create a Form from Scratch or Create a Form using Templates to create a new one.

Edit Chained Select Field

Once on the Editor page, click the Plus Icon in your form editor and open the Advanced Fields module. You can also find this option in the right sidebar under the Input Fields tab.

Now, select the Chained Select field by clicking or dragging it and dropping it into your editor.

Adding Chained Select Field

Chained Select Field gives you three drop-down fields. There are Parent, Child, and Grand Child. When the Parent drop-down is selected, the Child drop-down will only show options that belong to the Parent field.

On the other hand, it is the same for a Grandchild. After selecting the child drop-down, the Grandchild will only show those options under the selected child field.

The field will reset automatically when a parent dropdown is changed and the child option does not match.

Customizing the Chained Select Field

Once you add the Chained Select field, you can customize it by hovering over it and clicking the Pencil Icon. It will take you to the Input Customization tab on the right, which offers the following customization options.

  • Chained Select Options

  • Advanced Options

Input Customization Fluent Forms

Chained Select Field Options

You will find various settings options for customizing the field under the Input Customization tab. These options allow you to configure essential aspects of the Chained Select field.

A. Element Label: This is the field title the users will see when filling out the Chained Select field in a form. You can enter any text here to help users understand the purpose of the field.

B. Admin Field Label: The admin field label is a field title displayed only to admin users. You can configure this option to show a different field label for your admin users when they view the form submissions.

C. Default Value: Using our shortcodes, you can manually set any fixed value in your field and pre-filled your input field dynamically. To get a better understanding of Dynamic Default Value, read this article.

You can add the default value by clicking the Three-Dot option from the right side.

D. Label Placement: This option allows you to determine the position of the label title where the user will see it. The available options are Top, Left, Right, and Default. All of those are self-explanatory except the Default. If you select the Default option, it will represent your global label placement settings.

E. Required: Decide whether users must select at least one option before submission.

F. CSV Data Source: Click the "upload" button to upload a CSV file from the dropdown under the File Upload options. If the data is hosted externally, provide a remote CSV URL.

Chained CSV Options

If you want to download the Sample CSV file, click Download Sample CSV options.

Here is a screenshot of the demo data. First-column names are placeholders for drop-down fields.

CSV Data File

Advanced Options

Advanced settings allow further customization to meet specific use cases.

A. Name Attribute: The input field’s name attribute is the HTML equivalent of the same name. You don’t need to modify this.

B. Help Message: This option allows you to guide your user thoroughly. Add your text here, which will be shown as a help message to the user.

C. Container Class: Use this option to add your custom CSS classes to the field’s wrapper.

D. Element Class: Add custom CSS classes to the input field.

E. Enable Searchable Smart Options: When you have a long dropdown list, you should give users the search option to select a field. Just enable the Searchable Smart options to allow users to search in dropdown fields.

A search option appears when this option is selected, allowing the user to search manually.

F. Conditional Logic: This option allows you to create specific rules to dynamically hide/show the input field to function conditionally based on your submission values according to your set of conditional logics. To learn more, read the Conditional Logic documentation.

Advanced Options

Embed the Form into Frontend

Once you complete the customization, click the Save Form button to save all your changes. Click the Preview & Design button in the middle to see the form preview.

To integrate and display the form on a specific Page or post, copy the Shortcode from the top right side and paste it into your desired Page or post.

Save Chained Select Field

Preview of Chained Select Field

Here is the preview of the added Chained Select field under the Form.

Preview Chained Select Field

Congratulations! You have successfully added a chained select field to your Fluent Forms form.