<Root>
The <Root>
is the top-level wrapper for programatic forms.
The only valid children are <SuccessPage>
, <ErrorPage>
, and multiple <Page>
s.
Use of <Root>
<Formally licence="...">
<Root>
<SuccessPage id="successpage"> ... </SuccessPage>
<ErrorPage id="errorpage"> ... </ErrorPage>
<Page id="page1"> ... </Page>
<Page id="page2"> ... </Page>
</Root>
</Formally>
<Root>
's props
Prop | About | Type |
---|---|---|
errorSummaryIntroHtml | Localisable HTML: Error Summary intro text | LocalisedHtml |
fieldErrorPrefix | Localisable PlainText: screen-reader-only content before form field error messages to give some context to error messages for screen reader users. E.g.
| LocalisedPlainText |
fieldErrorSummaryHtml | Localisable HTML: Accessibilty Compass 'Error Summary' link error content. Rendered as a link. E.g.
| LocalisedHtml |
fieldNextErrorHtml | Localisable HTML: Accessibilty compass next error content. Rendered as a link. E.g.
| LocalisedHtml |
fieldPreviousErrorHtml | Localisable HTML: Accessibilty compass preceding error content. Rendered as a link. E.g.
| LocalisedHtml |
fieldRequiredLabel | Localisable PlainText: describes the * symbol as required for screen readers. Kinda like alt-text for the * message on required form fields. E.g.
| LocalisedPlainText |
formBuilderId | The form builder id (optional). Only necessary if you're loading a form from GetFormally.com. | string |
formBuilderVersionId | The form builder version id (optional). Only necessary if you're loading a form from GetFormally.com. | string |
formRequiredDescription | Localisable PlainText: describes for all users (sighted, screen reader users, etc) that the form includes required fields which are marked with the * symbol. E.g.
| LocalisedPlainText |
hasAccessibilityCompass | Whether to enable the prototype accessibility feature 'Accessibility Compass'. The Accessibility Compass is displayed on form fields with errors, providing quick links to the Error Summary, any preceding error, any next error, and the submit button. (these four axes are why it was named a compass). | boolean |
hasAnalytics | Whether to send analytics to GetFormally.com
or a custom | boolean |
hasErrorSummary | Whether to display an error summary at the top of the page. Error Summaries make it easier to find errors by providing a list of errors in the page. This is because if there are only a few errors in a long page it can be difficult to find them, especially for screen reader users. | boolean |
hasSubmitScreen | Whether success page/error screens are used after a form submission. | boolean |
headingLevelOffset | For accessibilty reasons it's important that any headings ( The value of Leave this as If you do wish to choose a specific heading level offset choose a | HeadingLevel | "auto" |
hideInAnswerSummary | Whether to hide any answers below this. | boolean |
isHorizontalLayout | Whether to use a horizontal layout | boolean |
localeNames | Localisable Text: Locale picker locale names content.
| LocalisedPlainText |
locales | An array of the enabled locale ids for the locale picker. If a locale isn't in this list the localisable content won't be used. This also affects the order of locales in the Locale Picker, and the default locale if the user's browser doesn't express a preference. E.g.
| string[] |
localeSelectLabelHtml | Localisable HTML: Locale selector label content. E.g.
| LocalisedHtml |
progressIndicatorHtml | Localisable HTML: progress indicator content. Displayed at the top of the page. E.g.
See also the | LocalisedHtml |
publishedAtUTCms | When a form was published in UTC milliseconds. | number | false |
removeAutoSuggestionLabelHtml | Localisable HTML: Removing an | LocalisedHtml |
submitErrorChildrenById | Note: This is a JSON or Form Builder feature. SDK React users should use
one If you are using JSON or the Form Builder however then you can set either: 1) an empty array (indicating no error message at all), or; 2) An array with a single item, a string of an item id of type | string[] |
submitLabelHtml | Localisable HTML: Submit button content. | LocalisedHtml |
submitPendingHtml | Localisable HTML: While waiting for the network after a submission
this content will be used (and announced in an | LocalisedHtml |
submitSuccessChildrenById | Note: This is a JSON or Form Builder feature. SDK React users should use
one If you are using JSON or the Form Builder however then you can set either: 1) an empty array (indicating no success message at all), or; 2) An array with a single item, a string of an item id of type | string[] |
updatedAtUTCms | When a form was updated in UTC milliseconds. | number |
tags | A list of tags within the document. DOCS TODO | Record<string, Tag> |
meta | Arbitrary metadata on this node. This is useful when developing custom controls as it allows you to pass down metadata/extensions. | string |
childrenById | Used to indicate children ids which should only refer to If used in React this is non-editable. | string[] |
formDefinitionSchemaVersion | Non-editable It's the form schema version number so that if a breaking change is made to this schema format we can indicate changes. Presently | 1 |
hasChildrenById | Non-editable. Used to indicate that this component has children. | true |
hasTagsById | Non-editable. Used to indicate that this component isn't a form field with tags by id. | false |
id | Non-editable. Root must be called | "__root" |
isFormField | Non-editable. Used to indicate that this component isn't a form field. | false |
isMultichoice | Non-editable. Used to indicate that this component isn't a multichoice form field like | false |
pendingAttachments | Non-editable. This is an Internal API that shouldn't be used by developers. When using the SDK with JSX then React will useEffect components leaf-to-root, meaning that the parent node won't exist when the leaf is trying to attach itself. So this is a queue of pending attachments by orphans listing the parents they want. Thankfully it's just data, tragedy averted. | { from: string; to: string; }[] |
type | Non-editable. Type of component of | "Root" |