mirror of
https://github.com/directus/directus.git
synced 2026-01-25 05:47:57 -05:00
2.2 KiB
2.2 KiB
Fields
TK
Creating a Field
- Navigate to Settings > Data Model > [Collection Name]
- Under Fields & Layout, click the Create Field button
- Choose the field type, and follow its specific setup guide...
- Standard Field
- Presentation Field
- Many-to-One Field
- One-to-Many Field
- Many-to-Many Field
- Many-to-Any Field
- Translated Fields
::: Database Fields
Keep in mind that Directus Fields are just a database columns. Therefore you can import or create a column directly in the database, and it will automatically appear within Directus. The first time you manage that column, a directus_fields record will be created with default values.
:::
Duplicating a Field
- Navigate to Settings > Data Model > [Collection Name]
- Click the More Options icon for the field you want to delete
- Click the Duplicate Field option
:::warning Relational and Primary Key Fields It is not currently possible to duplicate relational fields or a collection's primary key. :::
Adjusting Field Layout
The layout of the collection's form is determined by the following field options.
- Field Visibility — If the field is "Visible" or "Hidden"
- Field Width — How wide the field is shown relative to the form/page
- Half — The field is shown at half the form width
- Full — (Default) The field is shown at the full form width
- Fill — The field is shown filling the page width
- Field Sort — The order of fields within the form
- Field Group — If the field is a "group" type
- Create any desired groupings by Creating a Field Group
- Click the More Options icon for any fields/groups to adjust visibility
- Click the More Options icon for any fields to adjust width
- Rearrange fields and groups with their drag-and-drop handles
Deleting a Field
- Navigate to Settings > Data Model > [Collection Name]
- Click the More Options icon for the field you want to delete
- Click the Delete Field option
- Confirm this decision by clicking Delete in the dialog
:::danger Irreversible Change This action is permanent and can not be undone. Please proceed with caution. :::