mirror of
https://github.com/zhigang1992/firecms.git
synced 2026-06-14 17:49:00 +08:00
3.7 KiB
3.7 KiB
id, title, sidebar_label
| id | title | sidebar_label |
|---|---|---|
| string | String | String |
config
storageMetaYou can specify aStorageMetaconfiguration. It is used to indicate that this string refers to a path in Google Cloud Storage.mediaTypeMedia type of this reference, used for displaying the preview.storagePathAbsolute path in your bucket. You can specify it directly or use a callbackacceptedFilesFile MIME types that can be uploaded to this reference.metadataSpecific metadata set in your uploaded file.fileNameYou can specify a fileName callback if you need to customize the name of the filestoreUrlWhen set totrue, this flag indicates that the download URL of the file will be saved in Firestore instead of the Cloud storage path. Note that the generated URL may use a token that, if disabled, may make the URL unusable and lose the original reference to Cloud Storage, so it is not encouraged to use this flag. Defaults to false.
urlIf the value of this property is a URL, you can set this flag totrueto add a link, or one of the supported media types to render a preview.enumValuesYou can use the enum values providing a map of possible exclusive values the property can take, mapped to the label that it is displayed in the dropdown. You can use a simple object with the formatvalue=>label, or with the formatvalue=>EnumValueConfigif you need extra customization, (like disabling specific options or assigning colors). If you need to ensure the order of the elements, you can pass aMapinstead of a plain object.multilineIs this string property long enough, so it should be displayed in a multiple line field. Defaults to false. If set totrue, the number of lines adapts to the content.markdownShould this string property be displayed as a markdown field. Iftrue, the field is rendered as a text editors that supports markdown highlight syntax. It also includes a preview of the result.previewAsTagShould this string be rendered as a tag instead of just text.
validation
requiredShould this field be compulsory.requiredMessageMessage to be displayed as a validation error.uniqueThe value of this field must be unique in this collection.uniqueInArrayIf you set it totrue, the user will only be allowed to have the value of that property once in the parentArrayProperty. It works on direct children properties or on first level children of aMapProperty(if set as the.ofproperty of theArrayProperty).lengthSet a required length for the string value.minSet a minimum length limit for the string value.maxSet a maximum length limit for the string value.matchesProvide an arbitrary regex to match the value against.emailValidates the value as an email address via a regex.urlValidates the value as a valid URL via a regex.trimTransforms string values by removing leading and trailing whitespace.lowercaseTransforms the string value to lowercase.uppercaseTransforms the string value to uppercase.
Based on your configuration the form field widgets that are created are:
TextFieldgeneric text fieldStorageUploadFieldthe property has a storage configuration.MarkdownField.the property has a markdown configuration.SelectifenumValuesare set in the string config, this field renders a select where each option is a colored chip.
Links: