Skip to main content
Since no business related code is hardcoded in Stratumn, the form of the action is defined in the action’s configuration using react-jsonschema-form, a package that makes it easy to create dynamic forms with a JSON Schema, as well as handle dependencies between fields.
const form: BetterFormDef = {
  schema: {
    title: 'A registration form',
    type: 'object',
    properties: {
      meal: {
        type: 'string',
        title: 'Meal'
      },
      comment: {
        type: 'string',
        title: 'Comment',
        format: 'draft'
      },
      required: ['meal']
    }
  },
  uiSchema: {
    'ui:order': ['meal', 'comment']
  }
};

Prefill fields

TODO