Enum Tablefield

A dropdown selection column with filtering capabilities, ideal for status values, categories, or any predefined set of options within a table row.

Properties

Attribute Comments
basic
name
string / required / unique

Field name
Alfanumeric + underscore + dash

This attribute represents the name of the form field.

type
string / required

Tablefield type

Other attributes might only be available for some tablefield types.

Choices:
  • text
  • textarea
  • number
  • password
  • checkbox
  • datetime
  • enum
label
string

Tablefield label
Free text

A friendly name/label for the tablefield

placeholder
string

In-field help value
Free text

Some form fields allow an in-field hint value.

data
default
many

Default value

The type of the value depends on the field type.
Can be string,boolean, number, array or object. When using an enum field, you can use the following special values :

  • __auto__ : select the first
  • __none__ : select none
  • __all__ : select all (if multiple is true)

from
string

Datasource
expression reference

In a table we can have an enum field. The source of the data for this enum field must come from the main form.
So this from field points to the expression field that holds the query data.

outputObject
boolean

Output the selection of an enum field as a full object.

When selecting from an enum field (dropdown), either the first column or
the column defined in valueColumn is sent as an extravar.
If you want the full selected record, use the property.

new in v4.0.20 : you can also use valueColumn: “*” to export all columns

Default:
false
valueColumn
string

The column of a selected item that needs to exported as extravar

When you select an item in an enum field, by default the first column is used to send as extravar.
By setting this property, you can change it to another field.
This setting is ignored when outputObject is true.

new in v4.0.20 : setting value “*” will export all columns.

Default:
first column
datetime
interaction
filterColumns
array

The list of columns that you can filter on

By default the previewColumn or first visible column is used to filter on.
With this property you can filter on the columns you want.

validation
required
boolean

Required field

Makes the field required.

Default:
false
visualization
icon
string

Field icon
Free fontawesome 6 icon

Some tablefields can hold a nice looking icon. The icon name is a free fontawesome 6 icon. You can find more information at www.fontawesome.com

sticky
boolean

Make a dropdown box permanently visible

A enum field is by default a dropdown box. However, you can change that behavior by setting this property.
The dropbox looses it reactivity and becomes a fixed table.

Default:
false
horizontal
boolean
added in version 4.0.3

Converts a dropdown box to a horizontal selector

A enum field is by default a dropdown box. However, you can change that behavior by setting this property.
The unselected values are on the left and the selected values on the right. This works in combiniation with sticky.
PctColumns are disabled, due to the space it consumes horizontally.

Default:
false
columns
array

The list of columns visible in the dropdown box

By default all properties are show in an enum field. With this property you can choose which are visible.

pctColumns
array

The list of columns that should visualized as a percentage-bar

By default all properties are show with its regular value.
With a percentage it can be nice to visualize it as a graphical bar.
The assumption is that the value is an integer between 0 and 100.

previewColumn
string

The column of the selected item(s) that is shown in the dropdown-preview

When you select an item in an enum field, by default the first column is used as a preview.
By setting this property you change the column to be used.

Default:
first column

Examples


Copyright © 2023-2026 AnsibleForms. All rights reserved.