I need to display the text according to the condition.
I will use php:
I will use php:
<?php if( $form->data['kurz'] = 1 ) { ?>but I will see it in my email
<p> kurz je jedna </p>
<?php } ?>
data['kurz'] = 1 ) { ?> kurz je jednaI can't figure out a mistake, please for help
$this->data("field") not $form->data["field"] (take note of the different bracket types too)
And for the code presented, use a Custom Code block NOT a PHP block
And for the code presented, use a Custom Code block NOT a PHP block
I changed the code to[pre]
<?php if( $this->data("kurz") = 1 ) { ?>[br]<p> kurz je jedna </p>[br]<?php } ?>[/pre]
but the result is the same
I don't understand "And for the code presented, use a Custom Code block NOT a PHP block"[br][br]the code is located in the email block.
<?php if( $this->data("kurz") = 1 ) { ?>[br]<p> kurz je jedna </p>[br]<?php } ?>[/pre]
but the result is the same
I don't understand "And for the code presented, use a Custom Code block NOT a PHP block"[br][br]the code is located in the email block.
The mail block doesn't do PHP.
Few options:
Put it in a custom code block set to return as var, and use the name of the block in your email as {var:blockname}
Use a switch, set to return as var, with conditions 1 and * in that order.
Few options:
Put it in a custom code block set to return as var, and use the name of the block in your email as {var:blockname}
Use a switch, set to return as var, with conditions 1 and * in that order.
Thank you for your advice, I will try the variable
it works perfectly
This topic is locked and no more replies can be posted.