Im making an email with is supposed to include some form info, but only if certain checkbox is checked (fakturatak). If so then depending on a radio button option checked (fakturaktoredane) a part of the email (danedofaktury) is composed. However when I put {danedofaktury} in the email template I just got an "empty" mail
Debug info:
Im new to PHP coding so I only know that I set up my custom code wrong. How to fix it, I have no idea though.
<?php
if ('fakturatak' == 1) {
if ('fakturaktoredane' == 'stare') {
$form->data['danedofaktury'] = "{$form->data['nazwisko']} {$form->data['imie']}, {$form->data['nazwafirmy']}
{$form->data['kodpocztowy']}, {$form->data['miejscowosc']}, {$form->data['ulica']} {$form->data['nrdomu']} {$form->data['nrlokalu']}";
} else {
$form->data['danedofaktury'] = "{$form->data['fakturanazwafirmy']}
{$form->data['fakturaadres']}
{$form->data['fakturanip']}";
}
} else {
$form->data['danedofaktury'] = "empty";
}
?>
Debug info:
[option] => com_chronoforms5
[chronoform] => e-porada
[event] => submit
[imie] => Herpus
[nazwisko] => McDerpington
[email] => herp@derp.lol.com
[telefon] => 555555555
[nazwafirmy] =>
[kodpocztowy] => 82-500
[miejscowosc] => Mokućki Dolne
[ulica] => Derp
[nrdomu] => 13
[nrlokalu] =>
[tresczapytania] => asd
[sposobdostarczenia] => email
[fakturavattak] => 1
[fakturaktoredane] => stare
[fakturanazwafirmy] =>
[fakturaadres] =>
[fakturanip] =>
[captcha] => hurfw
[button22] => Wyślij
[nadawca] => McDerpington, Herpus.
[danedofaktury] => empty
[ip_address] => ::1
Im new to PHP coding so I only know that I set up my custom code wrong. How to fix it, I have no idea though.