Documentation Index

Fetch the complete documentation index at: https://www.civicplus.help/llms.txt

Use this file to discover all available pages before exploring further.

Conditional Logic

Prev Next

Conditional logic is used to hide form elements until specific form conditions are met. This is controlled by a Show Conditionally switch in the element details. These conditions can apply to User Selection elements (Radio Buttons, Checkboxes, Select, and Autocomplete) it can also be applied to User Inputs elements (such as Text, Text Multi-Line, Number) and the Repeatable Set element.

Selection Elements

Conditional logic on selection elements allows you to only show a field if a user selection Is One Of the specified selections.

Is One Of options in dropdown.


Input Elements

Conditional logic on user inputs is simple: an input can either have a value or not have a value.

Does or does not have a value options in dropdown.


Repeatable Set Nested Elements

Conditional logic can be used on Repeatable Set nested elements to show if the element does or does not have a value.

Nested Element option under Show Conditionally toggle.


Multiple Conditional Logic Rules

After you have created a single conditional logic rule, additional rules can be added as well. When you add a second rule to the conditional logic of an element, the Match ALL and the Match ANY buttons will appear.

  • Match ALL: The Match ALL button will ensure that all of the rules are met before the element will display.

  • Match ANY: The Match ANY button will display the element if any of the rules are met.

Match all or any.

List options can also be conditionally displayed based on multiple other form elements.

Multiple conditions custom list.

Conditions for showing the Cat option based on renewal and pet type selections.


Conditional Logic on Numbers and Calculations

Conditional logic can also be placed on number and calculation elements. This will allow you to conditionally show an element based on the value of another element.

Value field on number conditional format.

The conditions you can place against number and calculation elements include:

  • Equal To

  • Not Equal To

  • Greater Than

  • Greater Than or Equal To

  • Less Than

  • Less Than or Equal To

  • Between (inclusive)

Number condition with Equal To selected in dropdown.

You are able to add as many conditional logic rules as desired, but they will follow these same logical rules.


Conditional Logic on Sub-Form Elements

You can also conditionally show elements on the main form based on the elements within a selected sub-form. In the example below, the "Name of City Park" field will only display if a user selects "Yes" on the element that asks "Will the fireworks take place at a city park?" from the embedded Fireworks Application form.

Subform Conditions.


Conditional Logic on Submission Date/Time

When configuring conditional logic for a workflow event or approval step, you can use Submission Timestamp to run an action based on when the form was submitted.

Submission Timestamp can be compared with a Date element in the form or a custom date using the following conditions:

  • is before

  • is after

  • is between

You can also apply an offset in days to the selected date. For example, you can check whether the form was submitted before an event date plus 30 days.

Example: Apply a Payment Amount Within 30 Days of an Event

This scenario shows how to apply a payment amount only when the form is submitted within 30 days of an event.

  1. Open your payment event and toggle on the Run conditionally option
    Payment events section with option for Run Conditionally toggled on.

  2. Select Submission Timestamp from the Only Run When drop-down and select Between from the Is drop-down
    CivicPlus Pay event setup with submission timestamp conditions for payment processing.

  3. For the From date, select a custom date 30 days before the event, and for the To date, select the event date
    CivicPlus Pay event settings with date range for submissions highlighted.

  4. The payment workflow event will only run when the form is submitted between the event date and 30 days after the event.

You can use the same approach in approval flows to determine whether an approval step should run based on the submission date.

Note:

When Submission Timestamp is compared with a Date element that does not include a time, the condition evaluates the entire selected day. The is between condition includes both the start and end dates.

Using a Date Element and Offsets

Instead of selecting a custom date, you can compare the Submission Timestamp with a Date element completed as part of the form submission. This is useful when the relevant date is different for each submission, such as an event, appointment, or commencement date.

You can also apply an offset to the selected Date element. The offset adjusts the date by a specified number of days, allowing you to create conditions such as:

  • Submission Timestamp is before the Event Date plus 30 days.

  • Submission Timestamp is after the Event Date minus 14 days.

  • Submission Timestamp is between the Event Date and the Event Date plus 30 days.

Using a Date element with an offset allows the conditional logic to calculate the relevant date range dynamically for each submission.