# Mailer\_Behaviour + Checkboxes

**URL:** <https://www.ruby-forum.com/t/mailer-behaviour-checkboxes/79146>\
**Category:** Radiant CMS\
**Created:** [December 12, 2006, 4:14pm UTC](https://www.ruby-forum.com/t/mailer-behaviour-checkboxes/79146 "2006-12-12T16:14:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![roa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8e7dd6/32.png) [@roa](https://www.ruby-forum.com/u/roa)\
**Post date:** [December 12, 2006, 4:14pm UTC](https://www.ruby-forum.com/t/mailer-behaviour-checkboxes/79146/1 "2006-12-12T16:14:28Z")

</div>

Hi guys,

Regarding the mailer\_behaviour, does anyone know how to deal with  
checkboxes properly?

I can insert them fine:

\<r:mailer:checkbox name=“checkered” /\>

…but when i try to access the value of them in my email\_html part:

\<r:mailer:get name=“checkered” /\>

…it returns nothing…

if i dont create the email\_html part, and just leave the email content  
up to the behaviour, it will only show up if it has been checked, and  
will look like this:

checkered: “”

does anyone know if it is meant to behave any differently? and if so,  
can you point me to some way of modifying the behaviour to return  
‘true’ if checked, or something like that?

Cheers,

Michael

---

<div class="post-metadata">

**Author:** ![roa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8e7dd6/32.png) [@roa](https://www.ruby-forum.com/u/roa)\
**Post date:** [December 12, 2006, 4:22pm UTC](https://www.ruby-forum.com/t/mailer-behaviour-checkboxes/79146/2 "2006-12-12T16:22:30Z")

</div>

not to worry, i figured it out myself… set a value on the element,  
dummy!

cheers,

michael

---

<div class="post-metadata">

**Author:** ![roa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8e7dd6/32.png) [@roa](https://www.ruby-forum.com/u/roa)\
**Post date:** [December 12, 2006, 4:24pm UTC](https://www.ruby-forum.com/t/mailer-behaviour-checkboxes/79146/3 "2006-12-12T16:24:32Z")

</div>

Hi Michael,

Try something like \<r:mailer:checkbox name=“checkered” value=“true” /\>

I haven’t had a chance to try this out yet, but judging from the source  
code  
it should work fine.

Best Regards,  
Kevin A.

On 12/12/06, Michael R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> …but when i try to access the value of them in my email\_html part:
> 
> Search: [http://radiantcms.org/mailing-list/search/](http://radiantcms.org/mailing-list/search/)  
> Site: [http://lists.radiantcms.org/mailman/listinfo/radiant](http://lists.radiantcms.org/mailman/listinfo/radiant)

–  
Kevin A.

Technical Director  
BN23 Search Ltd.
