The Text Field is the most basic field of the Dynamic Fields, it's meant to display plain text as it comes. It has an embedded email detection code that allows you to display emails with a different format in the UI.
...
Property | Type | Description | Required | Default |
---|
Enum | |||||
---|---|---|---|---|---|
type | string | The type of field. | No | text | text |
label | string/null | Label to show for this field. | No | null | |
css_style | object/null | Style to apply in the HTML of the UI. | No | null | |
css_class | string/null | CSS class to apply in the HTML component. | No | null | |
translate | string/null | Translation key for the field. | No | null | |
translate_label | string/null | Translation key for the label. | No | null | |
analytics | object/null | Analytics configuration. | No | null | |
if_not_exist | string/null | Show only if the specified field doesn't exist. | No | null | |
if_exist | string/null | Show only if the specified field does exist. | No | null | |
only_on_highlight | boolean | Show only when the value is highlighted. | No | false | |
display | any | Value from the field. | No | null | |
field | string | Path to field from which to retrieve the value (in JMESPath format). | Yes | ||
field_highlight | string/null | Path to highlight field from which to retrieve the value, in case it is not the same as the field parameter (in JMESPath format). | No | null | |
default | any | Default value to use in case no value was found for the field. | No | null | |
transform | array/string/null | List of transformations to apply to the displayed values. | No | null | |
suffix | string/null | Suffix to append to the value or values. | No | null | |
prefix | string/null | Prefix to append to the value or values. | No | null | |
suffix_label | string/null | Suffix to append to the label of the field. | No | null | |
prefix_label | string/null | Prefix to append to the label of the field. | No | null | |
sort | string/boolean | Sort order for values in an array. | No | false | asc, desc |
unique | boolean | If the values are in an array, remove the duplicates. | No | false | |
show_blank | boolean | If there is no value, or value is null, and show_blank is true, keep the field. | No | false | |
replacement | string/null | Replacement string for matches in the transformations Transformation.REPLACE_FIRST , Transformation.REPLACE_LAST , and Transformation.REPLACE_ALL . | No | null | |
pattern | string/null | Pattern used to look for matches in the transformations Transformation.REPLACE_FIRST , Transformation.REPLACE_LAST , and Transformation.REPLACE_ALL . | No | null | |
is_email | boolean | Indicates if the field contains email addresses. | No | false | |
use_ellipsis | boolean | Indicates if the field should use ellipsis for overflowing text. | No | true | |
email_regex | string | Regular expression pattern to match email addresses. | No | ^[a-zA-Z0-9.!#$%&'*+/=?^_`{ | }~-]+@a-zA-Z0-9?(?:\.a-zA-Z0-9?)*$ |
detect_email | boolean | Automatically detect email addresses in the field. | No | false | |
join | string | String to join multiple values. | No | , |
Info |
---|
Default value for email regex: "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$" |
...
Code Block | ||||
---|---|---|---|---|
| ||||
{
"type": "text",
"label": "Name",
"css_style": null,
"css_class": null,
"translate": null,
"translate_label": null,
"analytics": null,
"if_not_exist": null,
"if_exist": null,
"only_on_highlight": false,
"display": null,
"field": "name",
"field_highlight": null,
"default": null,
"transform": null,
"suffix": null,
"prefix": null,
"suffix_label": null,
"prefix_label": null,
"sort": false,
"unique": false,
"show_blank": false,
"replacement": null,
"pattern": null,
"is_email": false,
"use_ellipsis": true,
"email_regex": "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$",
"detect_email": false,
"join": ", "
}
|
Code Block | ||
---|---|---|
| ||
text_field_example = TextField(
field="name"
|
Code Block | ||||
---|---|---|---|---|
| ||||
TextField(Label='Email', field='data.user.email', detect_email=True, use_ellipses=False) |