Video instruction

How To Use Conditional Logic

Quasar form has powerful built-in Conditional Logic. You can use it to:

  1. Show / Hide fields
  2. Change text / html in the field ‘custom text’

1) Show / Hide Fields

Logic works according to a simple scheme, it consists of several elements.

  1. Сondition selector – selector whose value is checked
  2. Сondition – choose from the list of conditions
  3. Action – сhoose from the list of actions
  4. Action selectors – selectors on which we applied the action

Consider a simple example:

In this example, the following logic works: if the value of the ‘color’ field is equal to ‘red’ then the ‘name’ field is hidden.

There may be several conditions:

There can be many actions and selectors for applying actions:

2) Change text / html in the field ‘custom text’

In logic there is an action that allows you to change html or text in a field with arbitrary content ‘custom text’. No tag limit or character limit.