ember-power-select icon indicating copy to clipboard operation
ember-power-select copied to clipboard

Add required attribute

Open gossi opened this issue 9 years ago • 9 comments

Similarly to any other html form elements, they have a required attribute and if set, won't let the form submit until that form element has have a value. Would be good to have such an attribute for ember-power-select as well in order to become a html-like regular form element.

gossi avatar Jul 11 '16 15:07 gossi

@gossi eps is a "fake-select" component, meaning that there is no <select element underneath. I'm not seeing how we can achieve this without rendering an invisible select besides eps (I remember selectize does that).

miguelcobain avatar Jul 11 '16 17:07 miguelcobain

The component already accepts a required attribute that will set aria-required=true in the markup, but apparently forms don't obey this attribute the same way they obey the required=true.

I'm unaware if this can be accomplished without adding a fake input. Maybe it can be just a simple <input type="hidden" required value={{selected}}>, but I'd like first to investigate if there is a way of doing this without adding fake inputs.

cibernox avatar Jul 17 '16 08:07 cibernox

+1

jscottchapman avatar Jul 26 '17 21:07 jscottchapman

+1 as well

sauronnikko avatar Oct 13 '17 19:10 sauronnikko

Yout can't require hidden inputs :/

Exelord avatar Feb 20 '18 13:02 Exelord

Any status?

danilovaz avatar Feb 27 '18 13:02 danilovaz

+1

FutoRicky avatar Jan 04 '19 17:01 FutoRicky

Fake input or not or replacement to a standard one, it is a form element and by that should also behave like that. If a hidden input can't be required, you can use a regular input, style it to be display: none;, pass all input-field related args and attributes on that element and bind the value to the value of eps.

gossi avatar Jan 04 '19 19:01 gossi

any updates? also "required" attribute is missed in API docs

AmilKey avatar Jun 24 '24 07:06 AmilKey