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.
Hi taro8,
Please check your PHP. This check will always fail
Bob
Please check your PHP. This check will always fail
if ('fakturatak' == 1) {,
I think that you need if ( $form->data['fakturatak'] == 1 ) {
and the same in the rest of your code.
Bob
Unfortunately with your suggested changes I get " Undefined index" error now, the check still fails.
Hi taro8,
Have you checked your code? Did you mean to write fakturavattak instead of fakturatak ??
Bob
Have you checked your code? Did you mean to write fakturavattak instead of fakturatak ??
Bob
This topic is locked and no more replies can be posted.