• telwp

    (@telwp)


    One of my custom fields is a dropdown named ‘Company Name’.
    It contains 40 companies from 2 different industries.

    I’d like to have a dropdown like this:
    empty : Industry ONE
    company1a : Company 1A
    company1b : Company 1B
    company1c : Company 1C
    empty : (blank)
    empty : Industry TWO
    company2a : Company 2A
    company2b : Company 2B
    company2c : Company 2C

    Whenever I try to submit a 2nd/3rd/4th empty entry it just removes it and uses only the first one.

    If I can improve how I’m doing things I’d also appreciate any suggestions, it’s possible in the future this list may extend to 300+ companies so I’ll definitely need to think of something!

    Thanks

    http://wordpress.org/extend/plugins/custom-field-suite/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Matt Gibbs

    (@mgibbs189)

    Good question. I’ll have to think about this some more.

    What you’re asking for currently isn’t supported in CFS because select options are stored as a PHP associative array, with the value being the array key. Since you have the same key multiple times, it gets overwritten.

    Thread Starter telwp

    (@telwp)

    Ah I see, makes sense.

    Temporary fix in my case was to replace the multiple ’empty’ with empty1 :, empty2 :, and (blank) with a hyphen.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Not allowed multiple empty options in a dropdown?’ is closed to new replies.