You are viewing limited content. For full access, please sign in.

Question

Question

Is there any way to increase the width of list options in Forms?

asked on October 14

I have a list field in a table that is a bit skinny. It is populated via lookup so I'd like the lookup list to be wide enough to show all (or at least most) of the looked up items by width. I've tried using CSS to expand the box, which I can get working in Preview mode, but it doesn't work for real. I believe this is due to the dropdown being set dynamically with its own Style element.

Is there any way to expand the list items beyond the width of the field itself? This is using the modern designer in version 12. CoPilot suggests using some jQuery to listen for this item being added to the page and then updating its width element, but that's not an option with the modern designer.

Screenshot of what I want:

 

0 0

Replies

replied on October 14

I work around this by using a collection instead of a table. Functionally almost identical but you can make a single row in the collection contain multiple rows of fields instead of just one. This allows you to set the width of the fields much more easily.

1 0
replied on October 15

I'm interested to know how you were able to use CSS to get it to work at all in the preview mode? The dropdown options are given a width of the originating element and appended to the body element which you are not able to reach with CSS in the modern designer. If you could do it (not with css in the devtools), there isn't a reason you couldn't do it on the live form.

 

Your best option is to rethink the setup of the field. Is cost center + description really needed? Does the form filler need to see the description at all? If they do, is it really valid to obfuscate it when it is selected? Could description be populated in another field in the table? If it could, your original problem goes away because you can just make your original field larger to accommodate both.

 

Or of course, use a collection instead of a table for initial input.

1 0
replied on October 15

Hi Zach-

That screenshot is a bit misleading. If I inspect the element while the dropdown is shown I can manipulate it like you see via CSS in the DEV console. But once I select an option or otherwise close it, it resets the next time I expand it.

For this particular case, managers will be selecting the Cost Center and they may not be familiar with all of the codes, so including the description is helpful. However, once selected it's fine to not show the whole description so long as the code is visible. This isn't the first case where I've wanted a wider list of options for a smaller field showing enough to let you know what was selected.

This particular table was fine until they added 2 more columns. I may end up going the Collection route.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.