Jump to content

Fixing The Width Of A Dropdown Field


Recommended Posts

You can Edit the Style, enable Advanded options in the first wizard screen, go to settings screen, Forms/Details>>Fields>>Dropdown/Listbox
Go to CSS tab and add

Width:300px;
To the .cbFormSelect class

You can define a fixed value for dropdowns in the style but it applies to all the dropdown fields in the form so it does not work in your case.
Dropdowns expand according to the length of each option so if you have long texts for each option, it is not good to use dropdown.
Try the code below to set a fixed width for the dropdown, I hope that helps.

<script>
document.getElementsByName("InsertRecordFIELDNAME")[0].style.width = "300px";
</script>

Replace FIELDNAME with the actual dropdown field name.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...