Zum Hauptinhalt springen

Documentation

IMPORTANT

This is the outdated SI-documentation which will be adapted soon. A huge part may be obsolete!

Conditional Fields

Conditional fields are a set of custom fields that are displayed to users when certain conditions are met. The conditions in question are generally the values that were set by/taken from other custom fields.

Configuring Conditional Fields

In this guide, we'll provide a scenario for the conditional fields and how to set them up in your workflow.

Scenario
In the user profile workflow, we would like to ask users of what sports activities they are interested in. But first, we would like to know if they are interested in them. So, based on this, we'll need to configure the sports activities option to be shown depending on whether they are interested.

Custom Fields

Navigate to EasySocial > Users > Profile Form Builder and select a user workflow you like to work on.

  1. Click on the + New Custom Field button to add a new custom field. You should select a Boolean custom field and set the title to something like "Do you play sports as a hobby?".

    Conditional Fields

  2. After selecting the boolean custom field, then, set the details accordingly.

    Conditional Fields

  3. Next, click on the + New Custom Field button to add a new custom field. Select the Dropdown List custom field and set the details accordingly. Add some sports activity choices for the dropdown under the Field tab.

    Conditional Fields

  4. Click the Save button to store the changes.

Applying Conditional Rules

Now that we have the 2 custom fields set up, we can start to configure the conditional rules. Our goal is to show the second custom field (dropdown) depending on the user's selection of the first custom field (boolean). As such, we've to set the conditional rules in the second custom field (dropdown).

  1. Open the dropdown field setting and mark the checkbox that says This is a conditional custom field. Then, you'll notice that an additional tab called Conditional Rules instantly appeared.

    Conditional Fields

  2. Click on the Conditional Rules tab and then click on the leftmost dropdown. A list of all supported custom fields in the current workflow will appear. Select the earlier boolean custom field that we've created.

  3. Next, please choose the logic criteria when 2 or more criterias are added.

    Example:
    Choosing AND logic indicate that all your criterias must be true for the condition to be satisfied. Whereas choosing OR means that at least 1 criterion is true, then the condition is satisfied.
  4. The second dropdown should be the conditional action of the custom field. We'll use Equal in this example. In the value textbox, enter 1 and click done. That is all.

    Conditional Fields

    You'll have the option to add more criterias if you want the field to be appeared based on values selected from several fields. In the above screenshot, we've added another boolean field and selected OR logic criteria so that the dropdown will be displayed when any of these boolean fields is set to Yes.

    NOTE:
    Value 1 represents Yes and value 0 represents No for the boolean custom field.
  5. Click the Save button to store the changes in the workflow.

Testing Conditional Fields

You can test this by registering a new user or editing an existing user that uses this workflow. You should see the dropdown field will be displayed after either one of the boolean fields is set to Yes.

Selecting No

Conditional Fields

Selecting Yes

Conditional Fields

Limitation

You may notice that only certain custom fields are displayed in the dropdown when configuring a rule in the conditional rules tab. This is because currently only these custom fields are supported:

  • Email
  • Gender
  • Boolean
  • Checkbox
  • Country
  • Textarea
  • Textbox
  • Dropdown
  • Multilist
  • Mutlidropdown
  • Multitextbox
Wir benutzen Cookies
Wir nutzen Cookies auf unserer Website. Einige von ihnen sind essenziell für den Betrieb der Seite, während andere uns helfen, diese Website und die Nutzererfahrung zu verbessern. Du kannst selbst enscheiden, ob du Cookies zulassen möchtest. Bitte beachte, dass bei Ablehnung womöglich nicht mehr alle Funktionalitäten zur Verfügung stehen.