Documentation

Create an advanced form with conditions and variables


Creating a Complex Form with Conditions and Variables in Cadulis

With Cadulis, you can go far beyond simple data entry.
Complex forms allow you to adapt fields to each intervention context, automatically recall information (using dynamic variables), and condition field display based on previous answers.

This guide walks you step by step through creating an advanced form:

  • Conditional display
  • Dynamic variables
  • Hidden fields

1. Accessing the Form of an Activity Type

  • Go to the Catalog menu
  • Click on an existing activity type (or create a new one)
  • On the “Activity Type Information” page, click on:
    • Activity Form or
    • Closure Form
  • Then click on Add a field

2. Adding a Field with Conditional Display

  1. Choose a field type (e.g.: Text area)
  2. Enter a unique code (e.g.: satisfaction_client)
  3. Click on Add field

You are redirected to the “Edit Field” page:

  • Expand the Display menu
  • Click on Display conditions

In the pop-up:

  • Click on +
  • Fill in:
    • Field to test: list of already created fields
    • Condition type: “Is part of” / “Is not part of”
    • Comparison value: select an existing value
  • Click on Validate

You can then define a logical operator AND / OR if several conditions are present.

Example

If you have a client_satisfait field with values Yes / No,
you can display a comment field only if the client answers “No”.

3. Inserting Variables into Fields

Variables allow you to automatically display information in a form:

  • Date of the intervention
  • Client name
  • Address, field worker, closure comment, etc.

Where to Insert Them

  • In the Description field (text displayed above the field)
  • In the Default value field
  • Or in a Displayed text field

💡 Click on the “Replacements” icon in the interface to discover all available variables.


List of Available Variables

Variables are enclosed in curly braces {...} and can be inserted into:

  • Description
  • Default value
  • Displayed text

They can be used in visible, conditional, or hidden fields.

🔧 System Variables

Code Displays… Example
{system.dateTimeNow} Current date and time Timestamped signature
{system.isEnvironmentProduction} yes / nothing To differentiate test / prod

Examples:

  • {intervention.reference} – Intervention reference
  • {intervention.date.dayOfWeek} – Day of the week
  • {intervention.title} – Intervention title
  • {intervention.durationSeconds} – Duration in seconds
  • {intervention.businessUnit.name} – Associated BU

🧭 Intervention Address

  • {intervention.address}
  • {intervention.address.zipCode} – Postal code
  • {intervention.address.latitude} / {longitude} – GPS coordinates

👥 Client {intervention.customer.*}

  • {intervention.customer.name} – Name
  • {intervention.customer.email} – Email
  • {intervention.customer.custom.niveau_confiance} – Custom client fields

🙋 Field Worker {intervention.assignedUsers.*}

  • {intervention.assignedUsers.name} – Full name
  • {intervention.assignedUsers.email} – Email

✅ Closure {intervention.report.*}

  • {intervention.report.status} – OK / KO
  • {intervention.report.comment} – End comment

🔄 Linked Interventions

  • {intervention.parent.date} – Parent mission date
  • {intervention.container.*} – Information from a “container” mission

👤 Logged-in User {user.*}

  • {user.firstName} / {user.lastName}
  • {user.email}

4. Creating a Hidden Field (Not Visible to the Field Worker)

When adding a field, select Hidden field.

This field will be:

  • Invisible to the field worker
  • Usable in exports, reports, or conditional logic

💡 Ideal for transferring values between activity and closure without disrupting the user interface.


5. Advanced Tips and Inspiring Use Cases

  • Summary field:
    Intervention on {intervention.date} for {intervention.customer.name}

  • Default field worker name:
    Default value = {intervention.assignedUsers.name}

  • Symbol based on answer:
    {condition,champ_sécurité,OK,✓,✗}

  • Anonymize data:
    {ano,customer.email}


✅ Best Practices

✔️ First create control fields (e.g. Yes / No) before conditional fields
✔️ Give your fields readable codes (controle_securite)
✔️ Test your form with the Test button
✔️ Use horizontal separators to organize blocks