Forms are content patterns. Every day we encounter lots of formatted information: weather forecasts, sports cards, restaurant menus, user profile pages, tax documents and nutrition labels each have their own pattern of what information is included, and how it is laid out. These patterns help you compare and contrast information visually, and to notice missing information.

Decko lets you create forms and apply them to sets of cards, so they contain the same kinds of information with the same structure.  It does so using two settings: *structure and *default

 

Open these two Recipe cards, and you'll see they have the same structure:

You'll also see the same pattern when you create a new Recipe card.

Here's the structure rule that is used to template Recipes:

You'll notice the structure nests cards with recipe information like preparation and cook time, number served, ingredients, etc.  When someone edits a recipe, they can edit those nested cards. (See sample recipe edit form.)

 

*structure rules control cards' type and content. Like all rules, structure rules apply to a specific set of cards.  Changing a *structure rule will impact every card in the set.  Structure rules can be seen and edited in a card's dashboard (or "cardboard"), which is accessed via the ellipses icon (space_dashboard ) in a card's menu.

Nests in structures

Consider again our example of the recipe form card:

Looking at that card, you'll notice lots of nesting, like {{+ingredients|titled}}.  Here's how this works:

  • The double curly brackets ({{) represent a nest, meaning that the recipe card nests the ingredient card inside it.
  • The "+" before "ingredients" indicates that this is a contextual name. meaning the name of the nested card depends on the context of the nesting card.  For example, if I make a recipe called "Lobster Bisque", then its ingredient list will be named "Lobster Bisque+ingredients".
  • The "titled" refers to the view of the nested card.  When you see the ingredients card inside the recipe, it will be in titled view.

The important pattern to understand is that these structured nests establish naming patterns. All the cards that contain information about ingredients will have names that begin with the recipe name and end with "+ingredients".  

See also

 

  • Checkboxes, radio buttons, and other form elements can be added using Pointers.
  • You can add help text that shows up when nested cards are created or edited.

 

Discussion