In this tutorial you will learn how to Use ConfiForms Field Definition Rule to reduce a number of choices in a dropdown field.

We will consider 2 setups - one which uses database and another, which uses other form.

This tutorial is aplicable not only to dropdown fields, but also to:

  • radio group fields
  • advanced dropdowns
  • multi-select fields
  • checkbox groups fields

 

Let's start with form design. It will have just 2 fields

This means that we will have 2 variants of the same form (or 2 forms you may say)

Let's start with the one which has a dropdown field with the values loaded from a database table

A table we connect as a dropdown source has the following structure

IDNAMEIS_ACTIVE
1This onetrue
2Anothertrue
3Some inactivefalse
4Quattrotrue
5Obsoletefalse

This is stored in a table called "cf_demo_values"

create table cf_demo_values (id INTEGER NOT NULL, name CHARACTER(50) NOT NULL, is_active boolean);