Filters and logic are functions for designers and engineers.
The variable functionality in automatic email replies and email templates uses a library called Liquid. You can use various filters and logic beyond the examples listed below. For more details, please refer to this link.
Filters
You can use filter functions by adding a pipe symbol "|" after the variable, like {{ variable | filter }}. Filters allow you to process variables.
Example: Setting a quote filter
• Syntax: {{ variable | quote }}
• Result: The quoted text will have a ">" symbol added to the beginning.
• Effect: Makes quoted sections in inquiries more distinguishable.
Logic
By surrounding code with {% ... %}...{% end... %}, you can write logic such as conditional statements.
Using "if"
The block inside an "if" statement will execute when the condition is met.
Example:
{% raw %}{% if data['_field_1_name'] %}Dear {{data['_field_1_name']}}, thank you for your inquiry.{% endif %}
{% if data['_field_3'] != 'Inquiry A' %}For inquiries other than A, submissions may take more than 3 business days.{% endif %}
Using "elsif"
When using "elsif," blocks will execute depending on whether the conditions are met or not in each case.
Example:
{% if data['_field_3'] == 'Inquiry A' %}Thank you for your inquiry regarding A.{% elsif data['_field_3'] == 'Inquiry B' %}Thank you for your inquiry regarding B.{% endif %}
Conditional Logic with Numeric Values
When working with numeric values, blocks will execute based on whether the conditions are met or not.
Example:
{% assign age = data['_field_4'] | plus: 0 %}{% if age > 12 %}Thank you for your application.{% else %}This event is for participants aged 13 and above.{% endif %}
Please note that filter and logic functions are designed for designers and engineers. formrun does not provide support for these features, so please consult with your development team before implementation.