Hello,
first of all I need to say I have very little knowledge about php.
I have a form which behave differently dependently on user choices (some questions determines what questions users see later). For example I ask user if (s)he has different or the same delivery address. If the answer is "yes, address is the same", user doesn't even see fields about delivery address.
Form results are send by mail. I think the mail would be much more readable if I could use some if/else statements because I don't see any reason to send for example empty delivery address.
So I wrote something like this:
I would like to build it more, ad fields end so on, but firstly I've just checked if it is fine. It's not. I've got an email with info:
Parse error: syntax error, unexpected '{' in /domains/....../components/com_chronoforms5/chronoforms/actions/email/email.php(127) : eval()'d code on line 20
Probably I would have thought it's my mistake, but before I tried to build an array and I copied code from HERE it I've got similar effect: "eval()'d code on line XX". End I almost literally copied and pasted, because my field is named "color"...
Any advices?
first of all I need to say I have very little knowledge about php.
I have a form which behave differently dependently on user choices (some questions determines what questions users see later). For example I ask user if (s)he has different or the same delivery address. If the answer is "yes, address is the same", user doesn't even see fields about delivery address.
Form results are send by mail. I think the mail would be much more readable if I could use some if/else statements because I don't see any reason to send for example empty delivery address.
So I wrote something like this:
<?php
if ({Address_checkbox}=0)
print "<td>Delivery address is the same!</td>";
else
print "<td>Delivery address is diffrent!</td>";
?>
I would like to build it more, ad fields end so on, but firstly I've just checked if it is fine. It's not. I've got an email with info:
Parse error: syntax error, unexpected '{' in /domains/....../components/com_chronoforms5/chronoforms/actions/email/email.php(127) : eval()'d code on line 20
Probably I would have thought it's my mistake, but before I tried to build an array and I copied code from HERE it I've got similar effect: "eval()'d code on line XX". End I almost literally copied and pasted, because my field is named "color"...
Any advices?