Dropdown for additional fields?

Discussion in 'Templates customization' started by slinky, Nov 7, 2010.

  1. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
    I've seen people convert radio buttons from the membership options to a dropdown but what about doing the same for the additional fields. This is very, very necessary since there is no option that is space efficient in additional fields if you want a user to just select one item. Would love to either convert radio to a dropdown (radio is mostly useless to me) or add the type to the list of additional field types.
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    You already can display additional fields as dropdowns
    aMember CP -> Add fields -> Edit field -> Display type -> select(single value)
  3. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
    Alexander - it is not displaying as a dropdown. It shows as a very long list like multiple select but you can only select one item. So if you have 12 options in there they are listed in a big long box. If you make the box smaller you have to use a scrollbar to view the rest. Very awkward. When I mean a dropdown box I mean a dropdown slect from what appears to be just one fieldwhich actually drops down with all the selections visible and you can select one. Is it possible that I might be doing something wrong? It's what I'm seeing.
  4. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
    Alex - I solved the problem. You have a bug in the code, at least IMHO it is. If you want to remove the big select area from a single select (personal choice I guess) you need to remove:

    size="{$f.size|default:1}"

    in the add_field.inc.html template and it works like a charm!!!
  5. simplyautomatic

    simplyautomatic aMember Pro Customer

    Joined:
    Jul 2, 2009
    Messages:
    6
    Actually, I don't think it's a bug. If you edit the custom field, and change "Size of input field" to 1, then it appears as a dropdown. At least, that worked for me!
  6. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
    It says default: 1 but it didn't appear as a dropdown, at least not in chrome.
  7. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Just tested this in chrome as well.
    If you change field size to 1 in ammeber CP -> Add fields -> Edit it display dropdown list without a problem.
  8. kimboy

    kimboy New Member

    Joined:
    May 2, 2011
    Messages:
    20
    Actually, I don't think it's a bug. If you edit the custom field, and change "Size of input field" to 1, then it appears as a dropdown. At least, that worked for me!

Share This Page