powmedia / backbone-forms

Form framework for BackboneJS with nested forms, editable lists and validation
MIT License
2.17k stars 415 forks source link

default templates in README? #510

Open benlieb opened 8 years ago

benlieb commented 8 years ago

I think it would be a helpful addition to include the default form templates in the REAME. The section "Customising templates" is nice, but it's not clear how to make sense of it or even IF you'd like to customize them without first seeing them. I was able to look the source and I think I can see the templates themselves:

  template: _.template('\
    <div>\
      <label for="<%= editorId %>">\
        <% if (titleHTML){ %><%= titleHTML %>\
        <% } else { %><%- title %><% } %>\
      </label>\
      <div>\
        <span data-editor></span>\
        <div data-error></div>\
        <div><%= help %></div>\
      </div>\
    </div>\
  ', null, Form.templateSettings),

But that's pretty messy, and I'd rather see it in the README before the customize section. Just my two cents.

Keep up the good work.