Props

The Formatic library requires a minimal amount of props to render a form, as most of the configuration is passed down via the API from the cloud dashboard.

<Formatic
  apiKey={apiKey}
  channel={channel}
  children={children}
  config={config}
  data={data}
  environment={environment}
  formId={formId}
/>

Reference

apiKey

String Public API key made available within your cloud dashboard. Required.

channel

String Channel where you want the form to initially start from. Different channels simply refer to different starting pages on the form.

children

Node Special React prop passed through which we use to override and create custom components. For more information, refer to the React Documentation and Overriding Components section. Optional.

config

String Name of the config options to remotely load over the API. Optional, defaults to default. Common use cases may involve managing a different set of configuration options for mobile and desktop forms.

data

Object An instance of the Data helper class. Need to instantiate it before passing through:

render() {
  const data = new Data();
  
  return (
    <Formatic data={data} {...props} />
  )
}

environment

String Name of the environment to pull the latest form definition from. Optional, defaults to Live.

formId

Number The numeric ID corresponding to the form you want to render. Each form has a unique ID. Required.