I'm trying to create a multiple select box with size="4" attribute, but there is no option to specify size. If I put 20 options all 20 are been visible.

CommentFileSizeAuthor
#2 webform_select_size.patch526 bytesquicksketch

Comments

quicksketch’s picture

Version: 6.x-2.6 »
Assigned: AlekzZz-1 » Unassigned

No new features are being add to 2.x at this point. This is a good suggestion but one that might need some thought, since "size" doesn't have any meaning unless both "multiple" and "list box" options are checked (you don't need to specify size for radios or checkboxes).

quicksketch’s picture

Version: » 6.x-3.x-dev
Status: Active » Fixed
StatusFileSize
new526 bytes

It makes sense to have some kind of limit on #size, so I set the default to 4. If you need to do a custom size attribute, you can do so by theming your form and changing the element property (see THEMING.txt for more info on how to do that).

$form['submitted']['form_key']['#size'] = 10;

Unless we can figure out a way to make this an unconfusing option in the UI, this probably won't be exposed to the user.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.