function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mohita KalraMohita Kalra 

Hi, I have a recordEditForm where I have a picklist field..I need to set the size of the picklist dropdown

I have a recordEditForm with input fields. One of the field is a picklist.User-added imageBasically when I am trying to select Sub Branch , the picklist value is going inside of the form and I am not able to select other values....I have tried putting scroll bar too but that doesnt help. Can anyone please guide.
I have removed the data because of Data Privacy.
Its a long picklist but its going inside the form
ShirishaShirisha (Salesforce Developers) 
Hi Mohita,


You can try by using the pre-defined style classes for the size on the input field.

Kindly let me know if it helps you and close your query by marking it as best answer so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
Venu SamVenu Sam

I had similar problem and I was able to resolve the issue with below code.

<label for="Type" class="slds-form-element__label slds-no-flex">   --> TYpe is the lable.
                                        <abbr title="required" class="slds-required">*</abbr>Type   --> If you want to mark it mandatory.
                                    <select class="slds-select" name = "optionSelect" onchange={handleType} >   --> Handlign the selection
                                        <template for:each={Options} for:item="opt">   --> iterating over the options.
                                            <option key={opt.label} value={opt.value}>{opt.label}</option>   -> Display the value.

Let me know if this helps? Mark this as best answer.