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.

Display content IF - multiple options [EDIT]

February 03, 2014 3:25pm

Subscribe [2]
  • #1 / Feb 03, 2014 3:25pm

    franz

    8 posts

    I’ve had a closer look at what’s going on and why the IF statement doesn’t validate.

    Let’s assume the following:
    - I have a multiple selection field with options: 1, 2, 3
    - If I only select option one, “IF option 1” will validate
    - If I select option 1, 2, “IF option 1” will no longer validate

    How would an IF statement look like that validates as long as option ‘1’ is selected, no matter how many other options are selected?

    Thanks in advance!

  • #2 / Feb 04, 2014 4:55pm

    DesignBloke

    63 posts

    How is your IF statement currently written?

  • #3 / Feb 04, 2014 5:07pm

    franz

    8 posts

    This is how it currently looks like. It pulls data from a ‘Multi Select’ field.

    {if security_level == "Standard Security Level"}
                        <div class="col-sm-4 col-md-4">
                        </div>
                        {/if}
                        {if security_level == "Security Level Two"}
                        <div class="col-sm-4 col-md-4">
                        </div>
                        {/if}
                        {if security_level == "Security Level Three"}
                        <div class="col-sm-4 col-md-4">
                        </div>
                        {/if}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases