OptionalafterAn optional custom function that is called after the editor was rendered. Can be used, for example, to customize the HTML of the editor.
OptionalavailableDefines when this editor is available. For example, you can use this to show an editor only when a certain value is selected in another editor.
If the IPropertyDependencyDescriptor.test returns true, the editor
is available (visible); when it returns false the editor is unavailable (hidden).
When this property is set, the deprecated properties IPropertyDescriptor.depends and IPropertyDescriptor.dependsEval are ignored.
Note: For a bit more type safety, you can explicitly specify the type parameter of the dependencies:
{
cat: "...",
property: "...",
editor: "TextEditor",
availableIf: {
dependencies: ["name", "desc"], // error if name or desc is missing
test: (params) => {
params.values.name; // ok
params.values.foo; // error
},
} satisfies IPropertyDependencyDescriptor<"TextEditor", ["name", "desc"]>
}
The category where the editor should be displayed.The default categories used by formcycle are as follows, but you can register you own categories.
For form properties:
formBase - Base properties, the title and description of the form.formLayout - Layout related properties, such as the theme and max width.formBackups - Backup related properties, such as the maximum number of backups.formValidation - Validation related properties, such as whether the submit
button should be validated.formSeo - Search engine optimization related properties, such as the robots tag.formAdvanced - Advanced properties, such as the whether W3C mode is enabled.For form element properties:
attributes is the category for adding additional HTML attributes to the
item.autofill is the category for editing the autocomplete attribute of an
input field.base is the category for the base properties of a form item, such as
its name and alias.buttons is the category with the list of buttons available for a button
list item.constraint is the category with the conditions and constraints for an
item, such as whether the item is required, or under which circumstances
it should be visible or hidden.help is the category with the text area for the help text.image is the category for selecting an image.layout is the category for several layout related settings, such as
whether the item is visible, disabled, or read-only.linkPrivacyPolicy the category for the privacy policy link, available
only for footer items.linkImprint is the category for the imprint link, available only for
footer items.options is the category for entering the options that are available
for select elements.other is the category for entering an internal comment.print is the category with the settings for how the item should look
like when a PDF document is generated.readonly is the category for making an item readonly or disabled
depending on the current state of the form record the user's user group.style is the category for selecting additional CSS classes for the
item.text is the category with the label, placeholder and unit of a form
item, and the alignment of the label.values is the category for editing the initial value of an item
via a single line text field.valuesRTE is the category for editing the initial value of an item
via a rich text editor.viewable is for omitting an item from the form depending on the
current state of the form record the user's user group.OptionalcollapsedOptionalcontainerOptionaldependsName of the property on which the availability of this editor depends. You should also specify IPropertyDescriptor.dependsEval and implement the logic for checking the condition.
OptionaldependsCustom function that evaluates whether this property editor is available.
When this returns true, the editor is shown; when this returns false
the editor is hidden.
OptionaldynamicType of the editor to be used for editing the property.
Optionali18nI18n key for the label of the property.
When not label is present, the editor will have no label, which may be desirable for some editor such as RTE editors.
OptionallabelLabel for of the property, displayed next to the editor.
When not label is present, the editor will have no label, which may be desirable for some editor such as RTE editors.
OptionallabelThe position of the label for the editor.
OptionalpermissionCustom permission check logic. When the user lacks permission, the editor is not shown and the property is not editable.
By default, the permission check uses the role property with the name derived from the property.
OptionalplaceholderAn optional placeholder that is shown when no text is entered in the input field. This must be the localized string to display, not a message key.
The name of the form field property that can be edited with the editor.
Editors are mapped to properties in propertyView.js.
OptionaltitleAn optional title or tooltip that is shown when the user hovers over the the input field.
Optionaltrigger
Describes the MultiSelectType.