Forums

PHP to Display TICK instead of Checkbox value

wmuckell 14 Mar, 2012
I have a simple form with a checkbox on it. That when ticked I want a TICK to display in the email template.

I am testing this using this code in the email template, but nothing is returned.

<?php if({test}==1){
echo "Ticked: ✔";
}
else{
echo "Not"; 
} ?>
wmuckell 16 Mar, 2012
No one got any idea?
GreyHead 16 Mar, 2012
Hi wmuckell,

If you want the buttons to remain clickable then this article has a method that worked with CFv3 and can be adapted for CFv4.

Bob
wmuckell 16 Mar, 2012
I think you have misunderstood me. It is not the form itself it is the Email Template that gets sent out. Normally check boxes show just a 1 if ticked but I want it to show a tick instead in the email when sent.
Max_admin 17 Mar, 2012
then you can get the field name value in PHP using:
$form->data['field_name']


you can use the value in your PHP logic.

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.