Skip to content

Instantly share code, notes, and snippets.

@jvenator
Last active August 29, 2015 14:13
Show Gist options
  • Save jvenator/b4dfde9e145f48f89489 to your computer and use it in GitHub Desktop.
Save jvenator/b4dfde9e145f48f89489 to your computer and use it in GitHub Desktop.
register a custom ember easyForm form wrapper in Ember-CLI app
...
// ember-easyForm wrapper
app.import('vendor/form-wrapper-file.js');
...
// located at /vendor/form-wrapper-file.js
Ember.EasyForm.Config.registerWrapper('bs-wrapper-horizontal', {
formClass: 'form-horizontal',
labelClass: 'label-control'
});
@jvenator
Copy link
Author

Can't figure out how to pass a class value to the actual input rather than the wrapping div. I've tried everything I can think of: inputFieldClass:, fieldClass:, inputTemplateClass:, etc.

inputClass: 'form-control' results in the following (leaving out injected ember attributes).

<div class="form-control">
  <input type="text">
</div>

What I want is...

<div>
  <input class="form-control" type="text">
</div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment