When adding a gadget, you should consider all of the following items.
When creating a new gadget, there are a few main places to pay attention to:
Gadgets live in app/src/formbot/gadgets . Take a look at a simple one like the Text gadget to get a good sense of the
structure. The manifest file ties everything together, and gadgets are registered in app/src/formbot/index.jsx.
Gadgets are defined in server/gadgets and exported from server/gadgets/index.js. The main configuration options
are as follows:
defaultValue: Pretty straightforward - a good place to put a sane default.progressiveDisclosure: Defines the rules specific to this gadget for progressive disclosure.validateShape: Defines the required structure of the value.Gadgets live in server/lib/gadgets and exported from server/lib/gadgets/index.js. There is unfortunately a lot
of repetition in the gadget definition defined here and in builder-api-node. One big difference is that gadgets
defined here accept a validations key for server-side validations. However, be forewarned that server-side validation
error messages do not currently get rendered by the client app.