Hello @jmindl,
In the notification emails and thank you pages you can include (or not) fields in the summaries, depending on some conditions defined as attributes in the fields’ tags.
For example, assuming you want to include the fieldname1 only if it was submitted and it is not empty:
<%fieldname1 if_not_empty separator={{: }}%>
or you want include the fields: fieldname2 and fieldname3 if the fieldname1 was submitted and it is not empty:
<%fieldname1_block%>
<%fieldname2 separator={{: }} after={{<br>}}%>
<%fieldname3 separator={{: }} after={{<br>}}%>
<%fieldname1_endblock%>
If you have been installing the plugin’s updates, there are other attributes you can use with the fields tags, like: if_value_is_greater_than, if_value_is_greater_than_or_equal_to, if_value_is_less_than, if_value_is_less_than_or_equal_to, if_value_is, if_value_is_not, if_value_like and if_value_unlike
More information in the following link:
https://cff.dwbooster.com/documentation#special-tags
Best regards.
Thread Starter
jmindl
(@jmindl)
Hello @codepeople
This works perfectly,
As I do have a values which are under condition in the field displayed or not, but the value is zero I have following code
<%fieldname101_block%>
Výživné na druhé dítě<br>
<%fieldname64 separator={{: }} after{{<br>}}%><br>
<%fieldname101 if_value_is_greater_than={{0}} separator={{: }}%><br>
<%fieldname107 if_value_is_greater_than={{0}} separator={{: }}%><br><br>
Výživné na třetí dítě<br>
<%fieldname65 separator={{: }}%><br>
<%fieldname103 if_value_is_greater_than={{0}} separator={{: }}%><br>
<%fieldname108 if_value_is_greater_than={{0}} separator={{: }}%><br><br>
Výživné na čtvrté dítě<br>
<%fieldname66 separator={{: }}%><br>
<%fieldname102 if_value_is_greater_than={{0}} separator={{: }}%><br>
<%fieldname109 if_value_is_greater_than={{0}} separator={{: }}%><br><br>
Výživné na páté dítě<br>
<%fieldname67 separator={{: }}%><br>
<%fieldname104 if_value_is_greater_than={{0}} separator={{: }}%><br>
<%fieldname110 if_value_is_greater_than={{0}} separator={{: }}%><br><br>
<%fieldname101__endblock%>
There is an issue that these fieldsname103,108, etc. even there are higher then 0 (currency field)
And one more – fields
Výživné na páté dítě<br>
How I can avoid to display even these blocks.
Thanks
Hello @jmindl,
I’m not sure about the resutl you want to display, however, you are using the fieldname101 as block, so, if this field is not submitted or its value is blank, neither of tags into the block tags: <%fieldname101_block%>...<%fieldname101_endblock%> would be displayed.
Note that values like: 0 Kč are not empty values, so, I recommend you to use attributes like: <%fieldname108 if_value_is_not={{0 Kč}} separator={{: }} after={{<br>}}%>
Best regards.
Thread Starter
jmindl
(@jmindl)
Still doesn’t work. I will open a ticket.
Hello @jmindl,
As I said previously, 0 Kč submitted by the fieldname101 is a value, so, the condition: <%fieldname101_block%>...<%fieldname101_endblock%> is satisfied. You should redefine the tag that open the block as follows:
<%fieldname101_block if_value_is_not={{0 Kč}}%>
or even better:
<%fieldname101_block if_value_unlike={{0 Kč}}%>
Best regards.
Thread Starter
jmindl
(@jmindl)
I got it. All works now. Thanks a lot for your support