Checkbox

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
fciprian
Veteran Member
Posts: 52
Joined: 2020-04-20 10:51

Checkbox

Post by fciprian » 2020-11-11 15:04

Hello

I need some support please.
I have set up to send me an email when a record is added.
Everything works well. BUT :) on a field with Check box. If it is checked in database is 1 and if it is not in 0.
How can i make in email to show me in sted of 1 to be shown YES and if it is 0 to be shown NO in the email ?

Thank you
I apriciate your help!!!!

ksabra
Posts: 8
Joined: 2020-05-26 11:58

Re: Checkbox

Post by ksabra » 2020-11-11 20:01

Code: Select all

	$status = $data['check fieldname'];
	if ($status == 1) {$status = "YES";}
	else $status = "<strong>NO</strong>";
mail body

Code: Select all

<?php echo $status; ?>

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Checkbox

Post by onoehring » 2020-11-13 07:26

Hi,

why not use radio buttons (but this will make you need to change the datatype):
ec_options.png
ec_options.png (41.15 KiB) Viewed 1232 times
Olaf

Post Reply