Placeholder for Dropdown reference selector

0
I have a dropdown reference selector in which users can select a company and I need to put some sort of placeholder in it, but I know that this property doesn't exist in the <select>. I tried to use the widget HTMLSnippet to insert an option like "select a company" and put its property "selected" to true but no matter what changes I make via Javascript none of them are reflected to the <select> dropdown. Anyone have a suggestion?
asked
2 answers
0

The tough part here is getting your JavaScript to run after the reference selector widget has already loaded. You could also definitely accomplish this with a custom widget.

Instead, I would simply recommend that you use the label on your reference selector to guide your user.

answered
0

For people who are searching for a solution for this, there is a custom widget in the appstore for this:

DropdownSelector

The widget adds a placeholder functionality as well as the creation of a stylable version of a dropdown selector and it's elements. This stylable version uses Bootstrap compatible markup and styling and is easily adjusted to the desired result. It is meant as an extension of the native Mendix dropdown selector elements such as reference selectors. Meaning you can still use all the normal, native options of the Mendix widget.

answered