I have been using the form wizard as well as my own code to create forms. I have found when I use my own code, the email results for fields where nothing was entered shows as the bracketed field name. When I use the form wizard, however, in the same situation, the email result would be nothing. An example would be...
Email Template Has:
Address: {address}
If the user did not fill out that field in a form built with the form wizard, it would show:
Address:
A form with my own inserted code, but the same email template reference, would show:
Address: {address}
I would like the email to look like what the form wizard form shows... nothing. This keeps the emailed results much easier to read.
Any thoughts on to why it is different or how I can adjust to fix it?
Thanks,
James Mills
I am using CF 1.5.13.
Email Template Has:
Address: {address}
If the user did not fill out that field in a form built with the form wizard, it would show:
Address:
A form with my own inserted code, but the same email template reference, would show:
Address: {address}
I would like the email to look like what the form wizard form shows... nothing. This keeps the emailed results much easier to read.
Any thoughts on to why it is different or how I can adjust to fix it?
Thanks,
James Mills
I am using CF 1.5.13.
Hi jmills6,
There should be no difference between the two ways of creating the Form HTML. The only time usually you'd see the {address} type of output is with unchecked checkboxes.
What do you have in your HTML for this text input?
Bob
There should be no difference between the two ways of creating the Form HTML. The only time usually you'd see the {address} type of output is with unchecked checkboxes.
What do you have in your HTML for this text input?
Bob
Ahhh... now that you mention the check boxes, that's where I'm seeing them. When I use the form wizard, they are basic forms where I generally don't use check boxes, but some of my custom forms are full of check boxes and that is when it is showing up... so with that said, is there a way to make an unchecked box not show up in the email template? Kind of hide it?
The text fields are fine and work like you said, so ignore my example. Sorry about that.
The text fields are fine and work like you said, so ignore my example. Sorry about that.
Hi jmills6,
An un-checked checkbosx returns nothing in the $_POST array so ChronoForms doesn't know that there *should* have been a value. You can fix this in the OnSubmit Before box
This either passes on the value or sets a default value ('' in this case) which will be used to replace {check_0} in the template.
Bob
An un-checked checkbosx returns nothing in the $_POST array so ChronoForms doesn't know that there *should* have been a value. You can fix this in the OnSubmit Before box
$check_0 = JRequest::getVar('check_0', '', 'post');
JRequest::setVar('check_0', $check_0); This either passes on the value or sets a default value ('' in this case) which will be used to replace {check_0} in the template.
Bob
This topic is locked and no more replies can be posted.
