Skip to main content
All CollectionsHow-to Documents
How to Construct an "AND" Operator in Conditional Fields in Cargosnap
How to Construct an "AND" Operator in Conditional Fields in Cargosnap
Updated over a week ago

Conditional fields in Cargosnap allow you to create dynamic forms that adapt to your specific needs. With this feature, you can show or hide certain fields based on the user's input, making your forms more efficient and user-friendly.

However, you may have noticed that the current approach in Cargosnap's conditional forms is exclusively an "OR" operator. This means that if you have multiple conditions set, any one of them being true will trigger the action. But what if you want to create a more complex condition where all the conditions must be met? This is where the "AND" operator comes in.

What is the "AND" Operator?

The "AND" operator is a logical operator that combines multiple conditions and only returns a true value if all the conditions are met. In other words, all the conditions must be true for the action to be triggered.

How to Use the "AND" Operator in Cargosnap

While the current approach in Cargosnap's conditional fields is exclusively an "OR" operator, there is a way to construct an "AND" operator by combining multiple steps.

By combining multiple forms, you effectively create an "AND" operator. This means that all the conditions must be met for the action to be triggered.

Example

Let's say you have a form where you want to show a field only if the user selects "Yes" for two different questions. Here's how you would construct this using the "AND" operator in Cargosnap's conditional forms.

Now, the field will only be shown if the user selects "Yes" for both questions, effectively creating an "AND" operator.

Conclusion

While the current approach in Cargosnap's conditional forms is exclusively an "OR" operator, you can still construct an "AND" operator by combining multiple steps. This allows you to create more complex conditions and make your forms even more dynamic and efficient.

For more information on conditional forms in Cargosnap, please refer to our help center article on hidden fields or conditional fields. If you have any further questions or need assistance, please don't hesitate to reach out to our support team.

Did this answer your question?