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

custom submit button #28

Closed Nininea-zz closed 10 years ago

Nininea-zz commented 10 years ago

how can i add custom submit button?

Emerson commented 10 years ago

In my current app, I ended up doing this:

<h4>Login</h4>

{{#em-form model=model submit_button=false}}

  {{em-input property='email' label="Email" placeholder="Email address..."}}
  {{em-input property='password' label="Password" placeholder="Password..."}}

  <div class="form-actions">
    <input type="submit" class="btn btn-primary" value="Login">
  </div>

{{/em-form}}
asaf commented 10 years ago

You better bind the disabled field of the submit button to isValid otherwise you loose the option of having it disabled when the form is invalid.

I keep this open so I can document it.

Nininea-zz commented 10 years ago

@Emerson , @asaf thanks :)

asaf commented 10 years ago

@Nininea Sure, I documented it here: http://indexiatech.github.io/ember-forms/#/controls/custom-submit