Hello, how may this be realised in email-Template custom?
now:
[code<table>
<tr><td>field1</td><td>{field1}</td></tr>
<tr><td>field2</td><td>{field2}</td></tr>[/code]
to something like
now:
[code<table>
<tr><td>field1</td><td>{field1}</td></tr>
<tr><td>field2</td><td>{field2}</td></tr>[/code]
to something like
<?php echo "<table>"
if (!empty({field1})) { echo <tr><td>field1</td><td>{field1}</td></tr>}
if (!empty({field2})) {echo<tr><td>field2</td><td>{field2}</td></tr>
?>
Hello, Its getting tougher now
i need a statement like if !empty and !some_value of dropdown show in email
i need a statement like if !empty and !some_value of dropdown show in email
<?php if(!empty($form->data["myfield"]) || !($form->data["myfield"] == some_value)): ?>
myfieldlabel: {myfield}<?php endif; ?>
Hi mdma,
That should work OK. what exactly is the problem?
Bob
PS I prefer to use a Custom code action before the Email action to process the data and build parts of the template code but either method should work OK.
That should work OK. what exactly is the problem?
Bob
PS I prefer to use a Custom code action before the Email action to process the data and build parts of the template code but either method should work OK.
Hello Bob!!
first part is working with !empty field
second part !value of the field doesnt work...
<?php if(!empty($form->data["myfield"]) || !($form->data["myfield"] == some_value)): ?>
myfieldlabel: {myfield}<?php endif; ?>
first part is working with !empty field
second part !value of the field doesnt work...
<?php if(!empty($form->data["myfield"]) || !($form->data["myfield"] == some_value)): ?>
myfieldlabel: {myfield}<?php endif; ?>
got it now:
i use this for a dropdown event:if some_value selected ->show other txt field.
so in the email if "some_value" was selected the data from other txt_field is important
and not the data of dropdown value...
if( !empty($form->data["myfield"]) && !($form->data["myfield"] ==some_value)): ?>
myfieldlabel: {myfield}<?php endif; ?>
i use this for a dropdown event:if some_value selected ->show other txt field.
so in the email if "some_value" was selected the data from other txt_field is important
and not the data of dropdown value...
This topic is locked and no more replies can be posted.
