indexiatech / ember-forms

Smart, Intuitive forms for Ember.js styled with Bootstrap, Multi layouts and Validation support.
http://indexiatech.github.io/ember-forms
Apache License 2.0
218 stars 45 forks source link

Bindings for the name attribute of controls #26

Closed simonihmig closed 9 years ago

simonihmig commented 10 years ago

I find it useful to be able to set the name attribute of the control elements, for example to find the controls within integration tests. Standard ember input helper allow this, see http://emberjs.com/guides/templates/input-helpers/, but not ember-forms. Added the name property of the controls as a computed property, defaults to propertyName, so you have some reasonable defaults.

Hope this might be helpful to others!

Greetings, Simon

Emerson commented 10 years ago

Please merge this! Trying to write integration tests without this is almost impossible :+1:

asaf commented 10 years ago

@simonihmig @Emerson guys I missed this one, but I just committed this: [03481f232e56d0bb90e6], Is it good enough for you?

simonihmig commented 10 years ago

That should do it, thanks!

Emerson commented 10 years ago

I would still prefer to have the name attribute available as well, which I imagine helps support things like 1Password, screen readers, and potentially other JS libraries - but the ID is definitely something we need as well.

Once we get the tests running again I'm happy to add name support myself, I had it already implemented in a fork and was pretty minimal code.