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.

How to add "null" to native EE Dropdown list?

July 01, 2014 9:43am

Subscribe [0]
  • #1 / Jul 01, 2014 9:43am

    Riverboy

    2993 posts

    I tried to find answer from google but cant figure out this simple (i think it is) thing.
    I dont want that dropdown list takes the first option when I dont touch that at all.
    Now if i leave that alone, it still makes the choice and add the first option to it.

    And same goes when editing, i need to be able to have nothing on it, and ability to write down another choice that aint on the dropdown list.

    Simple but yet too hard for me as havent worked with these ever 😊

    This is because i want to use this on the entry page

    {if my_dropdown}{my_dropdown}{if:else}{something_else}{/if}

    Help would be nice, thanks.

  • #2 / Jul 01, 2014 10:01am

    Riverboy

    2993 posts

    LOLOL, never mind. This solved my headache in no-time 😊
    Had to just add that “—” to options, or what ever it will be in the end… 😊

    {if my_dropdown == '--'}{something_else}{if:else}{my_dropdown}{/if}

     

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

ExpressionEngine News!

#eecms, #events, #releases