ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

testing checkboxes

June 07, 2012 10:09pm

Subscribe [1]
  • #1 / Jun 07, 2012 10:09pm

    peaston

    14 posts

    HI All,
    I have one checkbox that can have up to 4 values in it,
    how do i test for a specific value?
    the checkbox is call event_display and can contain up to 4 values value1,value2,value3,value4

    {if  event_archive !="show on archive" AND event_display=="value1"}
    <.....>
    {/if}

    what i would like to do is:
        event_display CONTAINS “value1”

    i know i must be missing something but I cant see it.
    thanks in advance for your assistance

    Pete

  • #2 / Jun 11, 2012 9:55am

    Dan Decker

    7338 posts

    Hi Pete,

    Thanks for your question!

    Is the code above not working for you?

    That should be exactly how you test the value of your checkbox. However, the code in your example will on evaluate if both conditions are true.

    What is the result you are seeing?

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases