# How to style a PDF form drop-down?

**URL:** <https://pdfjs.community/t/how-to-style-a-pdf-form-drop-down/1079>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [October 19, 2021, 7:08pm UTC](https://pdfjs.community/t/how-to-style-a-pdf-form-drop-down/1079 "2021-10-19T19:08:27Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![psilva](https://avatars.discourse-cdn.com/v4/letter/p/d78d45/32.png) [@psilva](https://pdfjs.community/u/psilva)\
**Post date:** [October 19, 2021, 7:08pm UTC](https://pdfjs.community/t/how-to-style-a-pdf-form-drop-down/1079/1 "2021-10-19T19:08:27Z")

</div>

**Which product are you using?**  
PDF.js Express Plus

**PDF.js Express Version**  
8.1.0

**Detailed description of issue**  
I’m trying to find a way to edit the styling (border thickness and color) of a form PDF drop-down field. I’ve tried using this method:

> **[Customize PDF.js Express From Fields | Documentation](https://pdfjs.express/documentation/forms/styling-form-fields)**

It works great for normal fields, but when I try to edit the border styling of a drop-down, it doesn’t work. Here’s the relevant code I’m using to no effect:

```javascript
const { Annotations } = instance.Core;
Annotations.WidgetAnnotation.getCustomStyles = widget => {
    if (widget.fieldName === 'building_name_or_location') {
        return {
            'border-color': 'lightgray',
            'border-width': '2px',
            'border-radius': '2px'
        };
    }
};

```

(It’s definitely finding “building\_name\_or\_location” and entering that if-statement for that field, I checked).

It just ignores this code and keeps the border thick and red, which is the default style. Am I missing something?

Thanks,

Lucas

---

_[View the full topic](https://pdfjs.community/t/how-to-style-a-pdf-form-drop-down/1079)._
