We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Field Frame Checkbox Group

Development and Programming

greenblog's avatar
greenblog
20 posts
16 years ago
greenblog's avatar greenblog

Is there some place where I can see the checkbox group code implemented.

What I want is to be able to use the checkbox group on a conditional statement but everything I’ve tried doesn’t work. I can get it to work with just the one checkbox but not a group.

ie. works fine {if checkbox} my checkbox is checked {/if}

but this doesn’t work…

{if checkbox_group option="option1"} Option one is checked {/if}

I know it seems fairly simple but I’m not that good at coding and I couldn’t find a sample.

Thanks!

       
Robert Aitken's avatar
Robert Aitken
13 posts
16 years ago
Robert Aitken's avatar Robert Aitken

This worked for me…

{custom_field_name}
    {if "{option}"=="option1"}
        Option 1 is selected.
    {/if}
    {if "{option}"=="option2"}
        Option 2 is selected.
    {/if}
{/custom_field_name}

Putting the {option} variable inside quotes seems to be the trick.

       
greenblog's avatar
greenblog
20 posts
16 years ago
greenblog's avatar greenblog

Looks like that should work, I’ll try it,

Thanks!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.