Skip to content

Editing Components with Forms

Nelson Pecora edited this page Jun 26, 2017 · 9 revisions

Editing Components with Forms

The main way people interact with components is through forms. These allow you to edit single fields, groups of fields, and component settings in a consistent and manageable way. The simplest possible form is a single field in the schema:

title:
  _has: text

And a corresponding data-editable attribute in the template:

<span data-editable="title">{{ title }}</span>

When someone clicks on the title, a form will open with a single text input, allowing them to edit it.

Behaviors