Heres an example code to go in "OnSubmit - after email":
<?php
$recipient = $_POST['email'];
$ccemails = $_POST['email2'];
$subject = "My subject";
$html_message = "<h1>My thank you page</h1>
<p>Thank you <strong>".$_POST['fname']."</strong>, for filling out my form.</p>
<br />
<table>
<tr><td>First name: </td><td>".$_POST['fname']."</td></tr>
<tr><td>1st email: </td><td>".$_POST['email']."</td></tr>
<tr><td>2nd email: </td><td>".$_POST['email2']."</td></tr>
<tr><td>City: </td><td>".$_POST['city']."</td></tr>
<tr><td>Country: </td><td>".$_POST['country']."</td></tr>
</table>";
mosMail($from, $fromname, $recipient, $subject, $html_message, true, $ccemails, $bccemails, $attachments, $replyto_email, $replyto_name );
echo $html_message; ?>
Let's say you fill out everything except email2, then I dont want that table row (3rd row in my example above) to show at all in the resulting mail and thank you page. There's only a few of the fields that I need to check if they are empty or not, rest of them are requiered fields (and thus they need no checking).
I guess it should be some if-statement like
...if ($_POST['email2'] != NULL) then write the table row
else carry on with the next row...
How can I implement this in the above code? I'm a php novice...
I'm using Joomla 1.0.15 and ChronoForms 2.3.9