Forms and fields

Core to Buzzy's ability to work with data is how you define forms and fields in your Figma file.

Forms

The Buzzy plugin lets you define forms and fields directly in your Figma design. When you publish your app, they render as working forms, fields and real data.

Just as with other markup languages, a Form is simply a wrapper around a collection of editable fields and data.

If you want to render simply app data as (non-editable) content and values, you can do so without a Form. You can either rely on the currrent screen context, or to render a specific subset of results from a repeating set of data (eg a list of articles), you would use View (see below) instead.


Fields

Buzzy fields are the containers for data nested inside a Buzzy datatable. They include a variety of attributes (based on their type) and each includes an interface that will display in your published app to act as a way to capture, edit and read the data values contained in your data table.

You use the Buzzy Figma plugin to define the elements in your design that will act as these fields when published.

Field modes

Summary

Use this inside Views or anywhere you want to render the field data as a simple preformatted value. This is the simplest version, and is what you'll mainly use when rendering data from most fields.

Value

Similar to Summary, but depending on the field type you may get options to format how it renders - for instance date fields can be formatted as a string using a structure such as `D MMM, h:mm a`.

Read

This renders the field as a disabled input. You'd generally only use this in a form alongside other edit or insert fields, with the difference being you don't want the user to be able to edit this particular one.

Edit

Edit mode can only be applied to fields/inputs where they exist inside a layer defined as a Form in Edit mode. This will render the inputs in an editable format. Buzzy updates the data model instantly when a form is in Edit mode - meaning in this case the fields update their data values instantly (on blur) and the parent Edit form does not need to be submitted.

Insert

Insert mode can only be applied to fields/inputs where they exist inside a layer defined as a Form in Capture mode. This will render the inputs in an editable format, but the form must be submitted for then values to be saved to the data table (see below).

Additional mode: Filter

Filter mode is a special type of field mode that is only available for Text and Formula fields when they are wrapped in a Buzzy Filter component. This is like a special type of form used to construct a search or filtering interface. The fields (Text or Formula) render as editable inputs that are used to assign a search (or filter) term to the Filter component.

Additional mode: Image

This is a special mode available only to Buzzy plain text fields, where you may want to add an image to your design via an external url to the image file. In this case, Buzzy will convert the value of the text field (assumed to be a url to an image file) and render it as an image object, rather than as an input or string.


Views

Views are used to obtain a specific set of results from a datatable, for instance to build up a dynamic navigation menu. You might define a View that pulls a subset of data from an 'Articles' data table, and use this to create a dynamic menu of articles in your app.


Submitting a form

A Buzzy action of type 'Submit' is generally added to a button nested inside a Form container in Capture mode. The action will submit the current form to the Buzzy datatable.

Last updated