Home Forums Backend Issues (wp-admin) Change size of user select field


Change size of user select field

  • Hi
    I am using the new field type ‘user’ and it woks great.
    When i have a lot of users to select the select-box becomes scrollable and it is hard to se what users that are selected.

    The first and easy approach is to change the default size if the select field.

    I see that i can do this by overriding the css but have a hard time targeting my field:

    Current css styling the field

    #wpcontent select[multiple] {
    height: auto;

    My markup for the field
    <select id="acf-field-object_controller" class="user" name="fields[field_508efa3057634][]" multiple="multiple" size="5">
    How can i target my field an set height:300px?

    Another way is to alter the size-property. How can i do this? Filter hook?

    Lastly: Is there a way to change the UI to checkboxes instead of current UI?

  • Hi @torbjorn_s
    Currently, the user field is only as a select field.

    I will have a look at adding in the radio / checkbox options soon.

    You will need to use JS to remove the size=”5″ attribute and then your CSS will work to set a height


  • Hi @elliot
    Really good news. Checkbox option would be so mutch better UX in my application.
    I will try to change the size from 5 -> 30 with JS. Then i dont need to use CSS. I will report back.

  • How does one…

    use JS to remove the size=”5″ attribute

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Change size of user select field’ is closed to new replies.