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
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.
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”