BS4 Select "required" not working

I have a form where I have a BS4 Select which I have set to “Required: True”

This required attribute does not get added to the Select control.

Also for the “requried” to work the value must be value=“” (not: value=" ") - But If leave the value blank for the item in the select control the value attr is removed so the required still will not work

I’m not sure what you mean here - the BS4 Select control does not have a “Required” property. Maybe I need another coffee?

Hi, yes it does have that property but it doesn’t work.

Add a select and an input to a form, set both to “required” and then a submit button. Only the empty input gets the required notice show up when you press the submit button.

I checked the html code with chrome developer tools and the “required” attribute is missing for the select control.

To get round this I used a container and manually typed in the html code of a select control (copied from the bootstrap website) and that works.

Hope this explanation makes it clearer.

Many thanks,

Indeed you’re correct - it was the (lack of) coffee.

We’ll fix this.

Thank you, think I’ve found another one - It seems the “name” attribute does not get added to a BS4 select input.

Regarding the “name” attribute not being added to the select control - I manually entered the html code into a container so I can include and use the name attribute but on doing it like this the addItem function does not work (mySelect.addItem) it results in “mySelect.addItem is not a function”


We’re working on a new release now. I’ll make sure the fix is in.

Ok great, thank you.