-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: use Backform.js for forms #1475
Comments
Hi @sfranzen , |
Wrote a mock-up of the form for creating/editing a snapper configuration file on jsfiddle, you can view it here. It doesn't have an actual model yet, but the idea is simply that the "name" property of each field is the name of one of your model's properties; so it should for example automatically fill the form when you fetch an existing model from the server. |
Depends on #1455: Backform needs a more recent version of Backbone. |
Submitted #1484 to update Backbone. |
Closing this issue due to the apparent limited developer interest/time for it and as per our recent effort in reducing our JS dependencies (#2735). |
Backform.js is a set of Backbone components and templates designed to ease the creation of (Bootstrap) forms. Since we have a lot of such forms and related template code, it could help us to simplify and cut out a lot of code.
With Backform, you create a form using a list of JS objects specifying the label and control type for each form group:
The required templates are automatically rendered with each input dynamically linked to a model property. All the Bootstrap form controls are available by default, but since they are just Backbone views, it is easy to extend them or add custom ones.
I'm currently working on snapper (#1432) and will have to create some new forms, so I'm going to give it a try on my repo and report back with a "real" code preview.
The text was updated successfully, but these errors were encountered: