Skip to content

Scaffold

Daryl Hedley edited this page Feb 3, 2015 · 15 revisions

Description

Scaffold is used to build out all our main form editing pages. At the heart of it is Backbone Forms that enables us to use schemas to render forms with very little effort. Scaffold wraps around Backbone Forms and offers us an API that can enable fieldsets, custom views, custom fields, custom templates and custom validators. It also manages overlays opened during editing forms and pulls down new schemas when plugins are configured.

API

Origin.scaffold.buildForm(options)

This will build a form object that can be used to append and commit the Backbone Form object. To build a form:

var form = Origin.scaffold.buildForm({
    model: contentObjectModel
});
Clone this wiki locally