Questions tagged [backbone-forms]

Form framework for Backbone.JS with nested forms, editable lists and validation

A flexible, customisable form framework for Backbone.JS applications.

  • Simple schema definition to auto-generate forms
  • Validation
  • Nested forms
  • Advanced and custom editors (e.g. NestedModel, List, Date, DateTime)
  • Custom HTML templates

Source: https://github.com/powmedia/backbone-forms

63 questions
8
votes
1 answer

List of Nested Models in Backbone-Forms

I have a many to one relationship I'm trying to model with Backbone-Forms that I can't get to work. The idea is that there are many foos that are attached to a single bar. The catch is every bar must have at least one foo. I want to be able to have…
5
votes
2 answers

Backbone forms with nested models and custom template

I'm currently using Backbone forms. I currently have a schema which loads fine using nested models. When I try and style it with a template I don't get the expected results though. The template is similar to the following:
exussum
  • 18,275
  • 8
  • 32
  • 65
4
votes
1 answer

How to attach event handler in backbone forms

I am using Backbone form - https://github.com/powmedia/backbone-forms. In few fields I am using custom template for a specific field. Lets say something like this Now Lets say I want to attach a click event handler to "Add month". What is the best…
manu4543
  • 508
  • 1
  • 8
  • 15
4
votes
2 answers

Backbone-forms.js - how to render submit button in example from the github "docs"

this is the code from backbone-forms. for now, i would like to render a submit button to validate my textfield and stuff, which is documented, except how to get that submit button into the dom. feel free to downvote, anyways in my opnion this is…
thegrunt
  • 1,054
  • 1
  • 11
  • 22
4
votes
2 answers

How do I use JQuery Datepicker with Backbone-Forms?

var User = Backbone.Model.extend({ schema: { date: {type: 'Date'} } }); var user = new User(); var form = new Backbone.Form({ model: user }).render(); $('.bootstrap').append(form.el); What type do I enter to use the included…
Adrian Bartholomew
  • 2,506
  • 6
  • 29
  • 37
3
votes
1 answer

How to use nested models with Backbone Forms List? I want to make a nested model with custom template

How do I use nested models with Backbone Forms List? I want to make a nested model with a custom template, but this is giving an error: "Render of undefined" I want to make a view by backbone-forms with a custom template. The template is
3
votes
4 answers

How to automatically focus first backbone-forms input field?

The following screenshot shows a combined form for sign-in and sign-up: The following module is used to render the AuthView: MyApp.module("User", function(User, App, Backbone, Marionette, $, _) { User.AuthView = Marionette.ItemView.extend({ …
JJD
  • 50,076
  • 60
  • 203
  • 339
3
votes
0 answers

Backbone.bootstrap-modal.js not working

I am following this fiddle http://jsfiddle.net/evilcelery/4XZMb/ $(function() { //Use BootstrapModal for object List editor Backbone.Form.editors.List.Modal.ModalAdapter = Backbone.BootstrapModal; //Main model definition var User =…
Sudo
  • 559
  • 1
  • 8
  • 15
2
votes
0 answers

How can I render a object type with Backbone forms?

Define: schema: { salutation: { type: 'Select', validators: ['required'], editorClass: 'form-control', isRequired: true, title: 'Salutation', }, address: { type: 'Object', …
2
votes
1 answer

Backbone-rails model referencing with sprockets

I have this backbone application built on Rails with sprockets, and I'm using backbone-forms and associations. The files (models and collections etc) are included in a certain order (thanks to the sprockets). The problem is that when I create a form…
2
votes
1 answer

Backbone.js submit event not firing

I'm at a loss as to what's going on here. I think it's because I'm loading the form later on in the view, but I'm honestly not sure. Here's my view. define([ 'jquery', 'underscore', 'backbone', 'serializeForm', 'backboneForms', …
Willem Ellis
  • 4,886
  • 7
  • 38
  • 55
2
votes
0 answers

List editor and events of its items editors

I have a very simple model: var ListItem = Backbone.Model.extend({ schema: { name: 'Text', } }); and another simple model which has a list inside: var Configuration = Backbone.Model.extend({ schema: { list: { …
user2068645
  • 137
  • 2
  • 7
2
votes
1 answer

Backbone-forms . js Doc Example: Onchange Populator: How can i hide the second select and show it after the change event?

this is my code from the docs from which i want to learn from. in my opinion it would be cool to hide the second select and show it up, when the change event was fired. i tried some function injections without good results. can anyone give 2 cents…
thegrunt
  • 1,054
  • 1
  • 11
  • 22
2
votes
0 answers

Validate single fields of a backbone form

I would like to be able to validate single fields at a time in my forms using backbone forms and backbone validation, however I am having problems getting this to work if I put my requirements in the model validation, rather than the schema. My…
Sarah Tattersall
  • 1,275
  • 2
  • 21
  • 32
2
votes
1 answer

PUT and POST requests in Backbone.js

I have another question related to the PUT and POST requests. So, here I have a form which has the fields like : "name" and "link". On submit of that form, I am not able to post that form to the server on doing this.model.save(); Also, how do I…
Sudo
  • 559
  • 1
  • 8
  • 15
1
2 3 4 5