powmedia / backbone-forms

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

mustache / handlebars support #360

Open 0xgeert opened 10 years ago

0xgeert commented 10 years ago

Browsing through old commits it seems there once was a createTemplate and setTemplateCompiler functions to integrate different templating engines like Mustache.

Currently, there's only some artifacts/leftovers in some tests, but the actual functionality seems to be gone. (in plain Backbone-forms, in backbone-forms-marionette there seems to be something)

Any reason why it was deprecated?

tnunamak commented 10 years ago

I'm also curious about this one. Is it no longer possible to use an alternative templating engine?

powmedia commented 10 years ago

I think it's actually easier to use different template compilers now.

See the example at https://github.com/powmedia/backbone-forms/blob/master/README.md#example-fully-customise-forms-and-templates

The form just expects a compiled template function on Form.template so this can be created with underscore or anything else that returns a function with the same signature.