Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
English

Joget Form Builder allows you to dynamically change the options/selections of a select box/radio button/radio based on multiple form

...

field values within the same form.

Info
titleTips

Dynamic Cascading Drop-Down List is also supported in List Filters

too.

Image Removed

Figure 1: App Composer of Cascading Drop Down Application

Image Removed

Figure 2: Address form from the form builder

.

Table of Contents

How it works

Each option is a list of data from another form with an Form Data Options Configuration. Below will show the steps of configuring each form.

Configuring multiple dynamic cascading drop-down list

Create multiple simple forms with a 'Name' text field with no Advance Options configuration to create an option data list.

In this example, we will create 'Climate' and 'Continent' forms with the same configuration.

Image Added

Figure 1: Configuring Form Data Options


Create a 'Country' Form with the same configuration as Figure 1 but with an addition of the 'Climate' and 'Continent' select boxes which will be using the Form Data Options Data Store on the 'Continent' select box field to load data from the 'Continent' Form.

Image Added

Image Added

Figure 2: Configure Form Data Options Data Store

As shown in Figure 2, use the same configuration on the 'Climate' select box. Using Form Data Options Data Store, the 'Continent' As shown in figure 2 in the address form, Using Form Data Options Binder Continent field will view the values from the Continent List that contains only one column "Name", and the Climate field will view the values from the Climate List that contains only one column "Name".


Create 'Address' Form with all the previous forms as a select box with 'Continent', 'Climate', and 'Country' with the same configuration in Figure 2. But with additional configuration for the 'Country' select box.

Image Added

Image Added

Figure 3: Configure Country as Data Option Form

The Country field will view the values from the Country List under the Name column grouped based on the grouping by the other 2 columns "Continent ", and "Climate" with the help of the 'use AJAX for Cascade Options?' checkbox.


Image RemovedImage Added

Figure 3: Climate List

Image Removed

Figure 4: Continent List

Image Removed 

Figure 5: Country List

Image Removed

Figure 6: Country Field Properties

Image Removed

Figure 7: Shows the multiple dependency fields of Country Field 

Warning

The Field Id ID to Control Available Options Based on Grouping the Grouping Field (figure 74)  must be in the same order as the order in the Grouping Column (figure 63).

Image Removed

Figure 8: Country field is empty

The country field is empty as there is no Country in Asia where the Climate is Seasonal.

Image Removed

Figure 9: Country field shows values depending on the Continent Field and the Climate Field 

More Examples

Image Removed

Figure 10: Country field shows values depending on the Continent Field and the Climate Field (Europe + Tropical)

Image Removed

Figure 11: Country field shows values depending on the Continent Field and the Climate Field (Europe + Seasonal )

Image Removed

Figure 12: Country field shows values depending on the Continent Field and the Climate Field (North America+ Seasonal )

Image Removed

Figure 12: Country field is empty 


Make sure to click on the Field IDs rather than type them. You should only be typing the ';' symbol.

Multiple Dynamic Form in App Run Time

The figure below is the example data of which Country will appear based on the Climate and Continent combination. 

Image Added

Figure 5: Example Form Data option


In the app run time, we can see the 'Country' column is different based on the 'Climate' and 'Continent' columns as was set in Figure 5.

Image Added

Image Added

Figure 6: Multiple Form Data option testingThe country field is empty as there is no Country in North America where the Climate is Tropical.

Demo App

View file
nameAPP_cascadingDropDown
-1-20220921123150
_demo.jwa
height250