Forums

How to get checkbox value in email

rosrossy 21 Jul, 2015
Hi,
I'm having a problem with the single group checkbox value in email.
The problem is that I get its {name} in the email instead of its value.

It's a single checkbox that can be checked or not. This field is not required: the submit button is anyway operating.
So, I want to get in the mail:
- "ok" if the user checks the box
- "no" if the user doesn't check the box

I read I can solve this problem by adding an hidden field. Is this the correct way? Which code I have to write?

This is the code of the checkbox:
<td><input class="radio validate-one-required " title="Campo richiesto" type="checkbox" id="check" name="check" value="check">

Thank you very much!
GreyHead 21 Jul, 2015
Hi rosrossy,

In the Checkbox element set the Value box to ok; scroll down, Enable Ghost and set the Ghost value to 'no'

Put {check} in the email template.

A checkbox submits nothing if it is not checked, using the Ghost value changes this so that the Ghost value is submitted if the box is unchecked.

Bob
This topic is locked and no more replies can be posted.