powmedia/backbone-forms — pull request #115 by gucki (2012-08-20 22:01:10+00:00)
Title: Made field instance available in template as variable

I need to add a dynamic bootstrap `add-on` to one of my text inputs. As I didn't find a way on how to access "custom attributes" of the field from inside the templates I updated the code to also pass the field instance to the templates. Once can now do something like:

Inside the backbone view:
@model.someField = "lala"

Backbone.Form.setTemplates
'field-with-addon': '

{{title}}

{{editor}}{{field.model.someField}}

{{help}}

'