<Checkboxes>

Start of documentation content

Displays checkboxes with fixed multichoice options.

Only <OptionRoot> is a valid child.

Use of <Checkboxes>

Formally: Loading form, please wait...

For config of <OptionRoot>/<OptionGroup>/<Option> read their docs. <Select>, <Checkboxes> and <Radios> share the same options, making it easy to switch.

<Checkboxes>'s props

PropAboutType
choosePromptHtml

Localisable HTML: When multichoice is displayed in a <select> this is the first <option> used as a placeholder value to prompt choosing an option. Any HTML will be removed when displayed using Formally's default renderer.

LocalisedHtml
hintHtml

Localisable HTML: Hint content

LocalisedHtml
isRequired

Whether users are required to fill in this form field.

This setting affects aria-required and whether a * is displayed next to the form field, etc.

boolean
labelHtml

Localisable HTML: Label content

LocalisedHtml
name

The name attribute in HTML (MDN name attribute)

Name of the form control.

Submitted with the form as part of a name:value pair in the <Formally onSubmit> callback prop valuesAsFormNames.

string
showOptionHints

Whether to display option hints.

In some cases (eg. <Select>) the hints may not be used, and/or may have HTML tags removed leaving PlainText.

boolean
tagsById

A list of tags for for this form field.

string[]
validationErrorInvalidHtml

Localisable HTML: invalid validation content

LocalisedHtml
validationErrorRequiredHtml

Localisable HTML: required validation content

LocalisedHtml
id

Component Id.

Must be unique within the form.

string
meta

Arbitrary metadata on this node.

This is useful when developing custom controls as it allows you to pass down metadata/extensions.

MetaData
hasChildrenById

Non-editable.

Used to indicate that this component doesn't have children.

false
hasTagsById

Non-editable.

Used to indicate that this component has tags by id.

true
isFormField

Non-editable.

Used to indicate that this component is a form field.

true
isMultichoice

Non-editable.

Used to indicate that this component is a multichoice form field like <Select>, <Radios> or <Checkboxes>.

true
options

If used in React this is non-editable.

Only use this directly if constructing a document from JavaScript.

OptionNodes
pendingAttachments

Non-editable.

This is an Internal API that shouldn't be used by developers.

When using the SDK with JSX then React will mount 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 "Checkboxes".

"Checkboxes"