Enum XPropertyEnum
- java.lang.Object
-
- java.lang.Enum<XPropertyEnum>
-
- de.xima.fc.form.common.XPropertyEnum
-
- All Implemented Interfaces:
Serializable
,Comparable<XPropertyEnum>
public enum XPropertyEnum extends Enum<XPropertyEnum>
An enumeration of all properties a form element may possess. The properties for each form element are saved as a JSON object, with the key being one of these enumeration constants, and mapped to the value of that property. Most of these properties are editable in the XIMA FORMCYCLE designer. Later, when the form element is rendered (translated into HTML), these properties are read and influence how the element is rendered.When you create a widget plugin to add a new form element to FORMCYCLE, you need to specify which properties your widget should have. First decide on the type of form element (input text, upload fields, pages, headers etc.), then see the individual constants below, which explain whether they are needed for that particular type of form element. Also, please note that each property specifies the data type of its value, see below.
A note on data types: Most properties have their data type set to
String
. By convention, boolean attributes are represented by a string, with0
beingfalse
and1
beingtrue
. Numbers are usually stored as a string with their decimal representation. Finally, when a property is empty, the default value is used instead.To illustrate, this is a typical JSON structure for a simple form with one text input field, one select field, and one set of buttons (with a back, next, and submit button):
Click to expand JSON snippet
[ { "properties": { "maxwidth": "700px", "computedwidth": "100%", "viewstatus": [], "viewusergroup": [], "rowid": "", "cssclasses": [], "cssclasseswrapper": [], "backgroundcolor": "", "showrequiredhint": false, "usergrouppendent": "", "minwidth": "300px", "print_hide": "0", "statusdependent": "", "name": "header1", "attributes": [], "comment": "", "id": "xi-header-1" }, "className": "XHeader" }, { "properties": { "maxwidth": "700px", "viewstatus": [], "viewusergroup": [], "readonly_viewusergroup": [], "rowid": "", "backgroundcolor": "", "readonly_viewstatus": [], "usergrouppendent": "", "helptext": "", "print_hide": "0", "print_size": "16", "statusdependent": "", "id": "xi-p-1", "readonly_usergrouppendant": "", "computedwidth": "100%", "i18n": {}, "cssclasses": [], "cssclasseswrapper": [], "readonly_statusdependent": "", "subheader": "", "print_break": "0", "minwidth": "300px", "name": "p1", "header": "", "attributes": [], "comment": "" }, "className": "XPage" }, { "properties": { "maxvalue": "6", "requiredif": "xi-sel-2", "readonly_viewusergroup": [ "[!]Administrators", "Users" ], "hiddenifvalue": "", "required": "1", "rowid": "", "readonly_viewstatus": [ "[!]-1" ], "helptext": "<p>Help text</p>\n", "print_size": "10", "dynamic": "1", "id": "xi-tf-6", "readonlyifvalue": "3", "labeldir": "top", "maxlength": "255", "labelwidth": "120px", "requiredifvalue": "", "readonlyifclear": "1", "readonlyifmode": "2", "datepicker": "1", "dynamicMinSize": "1", "i18n": {}, "print_text_only": "1", "aliasname": "name <-- can have special chars", "unit": "Unit", "dynamicHideButtons": "", "requiredifcomp": 0, "name": "tfOther", "minlength": "3", "viewstatus": [ "Eingegangen" ], "viewusergroup": [ "Administrators", "Users" ], "dynamicMaxSize": "10", "vrule": "", "readonlyifcomp": "4", "title": "Title", "servervalidate": "1", "parentid": "xi-p-1", "usergrouppendent": "1", "datatype": "money", "print_hide": "0", "flex": "1", "print_func": "Word function", "statusdependent": "1", "isreadonly": "", "placeholder": "Placeholder", "value": "initial value", "readonly_usergrouppendant": "1", "mask": "0", "computedwidth": "100%", "ishidden": "", "unitwidth": "60px", "requiredgroup": "ad", "hiddenifclear": "1", "label": "<p>Label</p>", "minvalue": "3", "cssclasses": [ ".my-style", ".your-style" ], "cssclasseswrapper": [], "readonly_statusdependent": "1", "print_break": "1", "equals": "xi-tf-6", "hiddenifcomp": 0, "attributes": [ { "value": "val", "text": "attr1" } ], "hiddenif": "xi-sel-2", "comment": "", "vrulemismatch": "", "dynamicTrigger": "xi-sel-2", "readonlyif": "xi-sel-2" }, "className": "XTextField" }, { "properties": { "questions": [ { "value": "Question 1" }, { "value": "Question 2" }, { "value": "Question 3" } ], "requiredif": "", "checkboxmin": "", "readonly_viewusergroup": [], "hiddenifvalue": "", "required": "1", "rowid": "", "readonly_viewstatus": [], "helptext": "", "print_size": "10", "selectcolumnwidth": "0", "options": [ { "text": "Option 1", "title": "", "value": "1" }, { "text": "Option 2", "title": "", "value": "2" }, { "text": "Option 3", "title": "", "value": "3" } ], "dynamic": "0", "id": "xi-sel-2", "readonlyifvalue": "0", "labeldir": "top", "selecttextlayout": "right", "isdisabled": "1", "labelwidth": "120px", "requiredifvalue": "", "readonlyifclear": "1", "dynamicMinSize": "1", "i18n": {}, "print_text_only": "1", "aliasname": "myalias", "unit": "", "print_list": "0", "dynamicHideButtons": "", "datasource": "", "requiredifcomp": 0, "name": "sel2", "cob2auto": "1", "viewstatus": [ "Eingegangen" ], "viewusergroup": [], "dynamicMaxSize": "10", "readonlyifcomp": 0, "servervalidate": "1", "title": "", "parentid": "xi-p-1", "usergrouppendent": "", "print_hide": "0", "flex": "4", "print_func": "", "statusdependent": "1", "dsvalueidx": "2", "value": "", "readonly_usergrouppendant": "", "dstextidx": "1", "computedwidth": "100%", "ishidden": "", "selectlayout": "select", "checkboxmax": "", "unitwidth": "60px", "requiredgroup": "", "hiddenifclear": "1", "dstype": "", "label": "<p>Label</p>", "cssclasses": [ ".your-style" ], "cssclasseswrapper": [], "readonly_statusdependent": "", "print_break": "0", "hiddenifcomp": 0, "attributes": [ { "value": "value2", "text": "test2" } ], "hiddenif": "", "comment": "", "dynamicTrigger": "", "readonlyif": "" }, "className": "XSelect" }, { "properties": { "viewstatus": [], "viewusergroup": [], "readonlyifcomp": 0, "readonly_viewusergroup": [], "hiddenifvalue": "", "parentid": "xi-p-1", "rowid": "", "readonly_viewstatus": [], "usergrouppendent": "", "helptext": "", "flex": "1", "statusdependent": "", "id": "xi-btn-1", "readonlyifvalue": "0", "readonly_usergrouppendant": "", "computedwidth": "100%", "ishidden": "", "buttons": [ { "name": "btnPrev", "action": { "page": "", "check": "false", "value": "not defined", "optionId": "no action" }, "title": "", "value": "back" }, { "name": "btnNext", "action": { "page": "", "check": "false", "value": "not defined", "optionId": "no action" }, "title": "", "value": "next" }, { "name": "btnSubmit", "action": { "optionId": "submit + check", "page": "submit", "check": "true", "value": "submit + check" }, "title": "", "value": "submit" } ], "isdisabled": "", "i18n": {}, "cssclasses": [], "cssclasseswrapper": [], "readonly_statusdependent": "", "hiddenifcomp": 0, "name": "btn1", "textalign": "left", "attributes": [], "hiddenif": "", "comment": "", "readonlyif": "" }, "className": "XButtonList" }, { "properties": { "maxwidth": "700px", "computedwidth": "100%", "viewstatus": [], "viewusergroup": [], "rowid": "", "cssclasses": [], "cssclasseswrapper": [], "backgroundcolor": "", "showlogo": "1", "showrequiredhint": "1", "usergrouppendent": "", "minwidth": "300px", "print_hide": "0", "statusdependent": "", "name": "footer1", "attributes": [], "comment": "", "id": "xi-footer-1" }, "className": "XFooter" } ]
- Author:
- XIMA MEDIA GmbH
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
contains(String name)
Class<?>
getClazz()
Serializable
getDefaultValue()
static XPropertyEnum
valueOf(String name)
Returns the enum constant of this type with the specified name.static XPropertyEnum[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
parentid
public static final XPropertyEnum parentid
-
rowid
public static final XPropertyEnum rowid
Data type:String
Default:
(auto-generated)
Required for all form elements. This is the ID of the horizontal row (
.xm-form-row
) which contains the form element, if any. This property cannot be edited in the designer directly. When a form element is not placed in a row next to other form elements, its row ID is empty.
-
showpleaseselect
public static final XPropertyEnum showpleaseselect
-
showpleaseselectreq
public static final XPropertyEnum showpleaseselectreq
-
showlogo
public static final XPropertyEnum showlogo
-
showrequiredhint
public static final XPropertyEnum showrequiredhint
-
privacyPolicyShow
public static final XPropertyEnum privacyPolicyShow
Data type:String
Default:
0
Applies only to form elements of type
XFooter
. If set to1
, the selected privacy policy will be shown as a link or inline in the footer (seeprivacyPolicyIncludeType
).
-
privacyPolicyTemplate
public static final XPropertyEnum privacyPolicyTemplate
-
privacyPolicyIncludeType
public static final XPropertyEnum privacyPolicyIncludeType
Data type:String
Default:
dialog
Applies only to form elements of type
XFooter
. Determines how to include the selected privacy policy template (privacyPolicyTemplate
). Possible values aredialog
,_blank
andinline
.
-
imprintShow
public static final XPropertyEnum imprintShow
Data type:String
Default:
0
Applies only to form elements of type
XFooter
. If set to1
, the selected imprint will be shown as a link or inline in the footer (seeimprintIncludeType
).
-
imprintTemplate
public static final XPropertyEnum imprintTemplate
-
imprintIncludeType
public static final XPropertyEnum imprintIncludeType
Data type:String
Default:
dialog
Applies only to form elements of type
XFooter
. Determines how to include the selected imprint template (imprintTemplate
). Possible values aredialog
,_blank
andinline
.
-
name
public static final XPropertyEnum name
Data type:String
Default:
(auto-generated)
Required for all form elements. This is the name of a form element, as it can be edited in the Designer. It identifiers a form element and is used in placeholders and when accessing form elements via JavaScript. The name may contains only letters (
a-z
,A-Z
), numbers (0-9
), and underscore (_
). The name should be unique across all form element of a form, but does not need to be.
-
aliasname
public static final XPropertyEnum aliasname
Data type:String
Default:
(same as name)
Required for all form elements. This is the alias of a form element, as it can be edited in the designer. By default, the alias is set to the name of the form element. Compared with the name, the alias may contain any character. It can be used in placeholders, and for addressing third-party system that require a particular name. The alias, if set, needs to be unique across all form elements of a form.
-
id
public static final XPropertyEnum id
Data type:String
Default:
(auto-generated)
Required for all form elements. This is a unique ID of a form element and is generated automatically. Currently, IDs are of the form
xi-[type]-[index]
, e.g.xi-tf-7
for input fields orxi-sel-9
for select fields.
-
pdfImporterId
public static final XPropertyEnum pdfImporterId
Data type:String
Default:
(empty string)
Available for all fields. This is an internal ID used by the PDF importer to link the FORMCYCLE form field with the original PDF form field from which the form field was imported.
-
header
public static final XPropertyEnum header
-
subheader
public static final XPropertyEnum subheader
-
maxwidth
public static final XPropertyEnum maxwidth
Data type:String
Default:
700px
Applies only to form elements of type
XHeader
,XPage
, andXFooter
. This is the maximum width of the header, page, or footer, as a CSS unit. If the browser viewport is larger than this width, the header, page, or footer takes this maximum width, leaving white or grey borders around the form.
-
minwidth
public static final XPropertyEnum minwidth
Data type:String
Default:
300px
Applies only to form elements of type
XHeader
,XPage
, andXFooter
. This is the minimum width of the header, page, or footer, as a CSS unit. If the browser viewport smaller than this width, the form is displayed in responsive mode. This includes, for example, rearranging horizontal form elements vertically.
-
imageheight
public static final XPropertyEnum imageheight
-
imagewidth
public static final XPropertyEnum imagewidth
-
height
public static final XPropertyEnum height
-
autosize
public static final XPropertyEnum autosize
Data type:String
Default:
0
.Available for all textarea elements that allow to resize the field, to a size it needs to show the whole content. If set to
0
, the form element will not be resized.
-
characterCount
public static final XPropertyEnum characterCount
Data type:String
Default:
0
.Available for
XTextArea
s and other input elements that should display the number of entered characters. When set to1
, the number characters the user has entered is displayed below the textarea. Ifmaxlength
is larger than0
, the maximum number of characters allowed is displayed as well. Otherwise, when set to0
, no character count is shown.
-
computedwidth
public static final XPropertyEnum computedwidth
Data type:String
Default:
100%
Required for all form elements for which
flex
is required. This is a computed property that is filled automatically and cannot be edited in the designer directly. When multiple form elements are arranged horizontally in row, this property contains the computed relative width of the form element, in percent. When there is only one element in a row, this defaults to100%
.
-
selectlayout
public static final XPropertyEnum selectlayout
Data type:String
Default:
select
.Applies to select form elements (
XSelect
). Indicates how the select element is rendered, e.g. as a list of checkboxes or an HTML SELECT element. Supported values are currently- select
- Renders the select element as a drop down list, i.e. as an HTML (single) SELECT element. Only one option can be selected at any given time.
- list
- Renders the select element as an inline list of options, i.e. as an HTML SELECT element with a
size="5"
attribute. Only one option can be selected at any given time. - checkbox
- Renders the select element as a horizontal list of checkboxes (one checkbox for each option). Allows for
multiple options to be selected. See also
checkboxmin
andcheckboxmax
, which control how many options can be selected at once. The checkboxes may be displayed in multiple rows when no more space is available on the first row. - checkbox1
- Renders the select element as a vertical list of checkboxes, with one checkbox on each line. Allows for
multiple options to be selected. See also
checkboxmin
andcheckboxmax
, which control how many options can be selected at once. - radio
- Renders the select element as a horizontal list of radio buttons (one radio button for each option). Only allows for one option to be selected. The radio buttons may be displayed in multiple rows when no more space is available on the first row.
- radio1
- Renders the select element as a vertical list of radio buttons (one radio button for each option). Only allows for one option to be selected. The radio buttons may be displayed in multiple rows when no more space is available on the first row.
- table
- Renders the select element as a questionnaire with checkboxes, implemented via a table. Each of the available
questions
is shown as a row of the table, with one column for each available answer (seeoptions
). Allows the user to select multiple answer per question. - table1
- Renders the select element as a questionnaire with radio buttons, implemented via a table. Each of the
available
questions
is shown as a row of the table, with one column for each available answer (seeoptions
). Only allows the user to select one answer per question.
-
cob2auto
public static final XPropertyEnum cob2auto
Data type:String
Default:
0
.Only available for
XSelect
items with the propertyselectlayout
set toselect
. When this property is set to1
, the SELECT element is transformed into a text input field that features auto completion as the user types. The suggested items are theoptions
of the SELECT element.
-
cob2autoUnrestrict
public static final XPropertyEnum cob2autoUnrestrict
Data type:String
Default:
0
.Only available for
XSelect
items with the propertyselectlayout
set toselect
. When this property is set to1
, the entered text is not required to match one of the available options.
-
cob2autoMinLength
public static final XPropertyEnum cob2autoMinLength
-
selecttextlayout
public static final XPropertyEnum selecttextlayout
Data type:String
Default:
right
.Only available for
XSelect
items with the propertyselectlayout
set to one ofcheckbox
,checkbox1
,radio
orradio1
. Controls the position where the label text is shown for each checkbox or radio button. The following values are supported currently:- top
- The label text is shown above the checkbox or radio button.
- right
- The label text is shown to the right of the checkbox or radio button.
- bottom
- The label text is shown below the checkbox or radio button.
- left
- The label text is shown to the left of the checkbox or radio button.
-
selectcolumnwidth
public static final XPropertyEnum selectcolumnwidth
Data type:String
Default:
0
.Only available for
XSelect
items with the propertyselectlayout
set to one ofcheckbox
,radio
,table
ortable1
. This property specifies the width (in pixels) of each option with a checkbox or radio button and the label text. Defaults to0
, which computes a width automatically.
-
ishidden
public static final XPropertyEnum ishidden
Data type:String
Default:
(empty string)
.Available for all elements other than
XPage
,XHeader
andXFooter
. Controls whether the element is visible (when set1
) or hidden (when set to0
or the empty string). An element that is hidden is still present in the DOM, but hidden via CSS. Seereadonly_viewstatus
andreadonly_viewusergroup
, which remove form elements completely for certain states or user groups. Seehiddenif
to hide or show elements dynamically, depending on the value of some other form element.
-
isreadonly
public static final XPropertyEnum isreadonly
Data type:String
Default:
(empty string)
.Available for form elements of type
XTextField
andXTextField
. Controls whether the value of the form element can be modified by the user. The following values are supported currently:- 0 (or empty string)
- The form element is not disabled, the user can change its value.
- 1
- The form element is disabled and the user cannot change its value. This makes use of the
disabled
HTML attribute, which does not submit the current value of the form element when the form is submitted. - 2
- The form element is disabled and the user cannot change its value. This makes use of the
readonly
HTML attribute, which still submits the current value of the form element when the form is submitted.
-
isdisabled
public static final XPropertyEnum isdisabled
Data type:String
Default:
(empty string)
.Available for all form input elements other than
XTextField
andXTextArea
, such asXSelect
andXCheckbox
. If set to0
or the empty string, the user can modify the value of the form input element normally. When set to1
, the user cannot edit or modify the value of the form input element. This makes use of thedisabled
HTML attribute, which does not submit the current value of the form element when the form is submitted.
-
filepreview
public static final XPropertyEnum filepreview
Data type:String
Default:
0
.Available only for form elements of type
XUpload
. When set to1
and the user select a file for the upload element, a small preview of that file is shown next to the upload element. When it is an image file, a thumbnail of that image is shown. Otherwise, a generic icon for the type of file is shown. When set to0
, no preview is shown.
-
imageCompressionMode
public static final XPropertyEnum imageCompressionMode
Data type:String
Default:
empty string
.Available only for form elements of type
XUpload
. Defines whether and how uploaded images should be compressed. Valid values are:- none (or empty string): No compression is performed. This is the default.
- server: Compresses images on the server.
-
imageCompressionWidth
public static final XPropertyEnum imageCompressionWidth
Data type:String
Default:
0
.Available only for form elements of type
XUpload
. RequiresimageCompressionMode
to be enabled. The desired width for scaling the image before compression. Note that images are never scaled up, images are scaled down only when they are larger than the desired width.When both
imageCompressionHeight
andimageCompressionWidth
are set to0
(or a negative number), no scaling is performed. When only one of those properties is positive, the image is scaled proportionately to fit the target height or width. When both properties are positive, the image is scaled to the given height and widht, potentially changing the image's aspect ratio.- See Also:
imageCompressionHeight
-
imageCompressionHeight
public static final XPropertyEnum imageCompressionHeight
Data type:String
Default:
0
.Available only for form elements of type
XUpload
. RequiresimageCompressionMode
to be enabled. The desired height for scaling the image before compression. Note that images are never scaled up, images are scaled down only when they are larger than the desired height.When both
imageCompressionHeight
andimageCompressionWidth
are set to0
(or a negative number), no scaling is performed. When only one of those properties is positive, the image is scaled proportionately to fit the target height or width. When both properties are positive, the image is scaled to the given height and widht, potentially changing the image's aspect ratio.- See Also:
imageCompressionWidth
-
imageCompressionFormat
public static final XPropertyEnum imageCompressionFormat
Data type:String
Default:
empty string
.Available only for form elements of type
XUpload
. RequiresimageCompressionMode
to be enabled. The target format for the compressed image. Possible values are:- auto (or empty string): Attempts to use a sensible default format (the default). No guarantees are made, but generally, tries to preserve the original format of the uploaded image.
- png: Portable Network Graphics
- jpeg: JPEG image
-
imageCompressionAsPdf
public static final XPropertyEnum imageCompressionAsPdf
Data type:String
Default:
0
.Available only for form elements of type
XUpload
. RequiresimageCompressionMode
to be enabled. When1
, the compressed image image is wrapped in a PDF document.
-
imageCompressionQuality
public static final XPropertyEnum imageCompressionQuality
Data type:String
Default:
85
.Available only for form elements of type
XUpload
. RequiresimageCompressionFormat
to be enabled. The quality used for compressing images. Must be a value between0
(lowest quality) and100
(highest quality). Note that this property is used only for certainformats
.
-
mask
public static final XPropertyEnum mask
Data type:String
Default:
0
.Available only for form elements of type
XTextField
. When set to1
, the value entered by the user is masked or obfuscated, usually used for password input fields. Otherwise, when set to0
, the value is shown normally.
-
backgroundcolor
public static final XPropertyEnum backgroundcolor
Data type:String
Default:
(empty string)
.Available for container elements such as
XHeader
,XPage
,XFooter
,XContainer
, andXFieldSet
. This sets the background color of the container elements. When set to the empty string, no background color is used (transparent
). Can be any valid CSS color specifier, such asred
,rgb(112,93,0)
, or#666
.
-
hiddenif
public static final XPropertyEnum hiddenif
Data type:String
Default:
(no condition)
.Available for all elements other than
XPage
,XHeader
andXFooter
. A form element can be hidden automatically based on the value of another form element. This the ID of the other (referenced) form element. When the value of this property is empty, the form element is not hidden automatically.When this is set to the special value
FD2Const.CONDITION_VALUE_FORMULA
, the field is hidden if thecustom formula
evaluates to a truthy value.
-
hiddenifcomp
public static final XPropertyEnum hiddenifcomp
Data type:String
Default:
0
Available for all elements other than
XPage
,XHeader
andXFooter
. A form element can be hidden automatically based on the value of another form element. This is the condition applied to the value of the other form element. Available condition types are:- 0 (has a value)
- The form field is hidden when the other field is non-empty.
- 1 (equals)
- The form field is hidden when the value of the other field equals the
hiddenifvalue
. - 2 (does not equal)
- The form field is hidden when value of the the other field does not equal the
hiddenifvalue
. - 3 (matches regular expression)
- The form field is hidden when the other field matches the regular expression contained in
hiddenifvalue
. - 4 (is lower than)
- The form field is hidden when the other field's value is lower than the
hiddenifvalue
. - 5 (is greater than)
- The form field is hidden when the other field's value is greater than the
hiddenifvalue
. - 6 (lies between)
- The form field is hidden when the other field's value lies in the range as specified by
hiddenifvalue
. Thehiddenifvalue
must be a range in the formatx-y
, e.g.2-37
. - 7 (is lower than or equal to)
- The form field is hidden when the other field's value is lower than or equal to the
hiddenifvalue
. - 8 (is greater than or equal to)
- The form field is hidden when the other field's value is greater than or equal to the
hiddenifvalue
. - 9 (has no value)
- The form field is hidden when the other field does not have a value.
-
hiddenifvalue
public static final XPropertyEnum hiddenifvalue
Data type:String
Default:
(empty string)
Available for all elements other than
XPage
,XHeader
andXFooter
. A form element can be hidden automatically based on the value of another form element. This is the value against which the other form element is compared. Whether this property is required and what it must contain depends on the selected condition, seehiddenifcomp
for further details.
-
hiddenifclear
public static final XPropertyEnum hiddenifclear
Data type:String
Default:
(empty string)
Available for all elements other than
XPage
,XHeader
andXFooter
. A form element can be hidden automatically based on the value of another form element. This is a flag that indicates whether the form element is cleared when it is hidden. Can be set to one of the following options:- 0 (keep)
- The value of the form element is not changed when it is hidden.
- 1 (clear)
- The value of the form element is cleared when it is hidden. For text input fields, the value is set to the empty string; for select fields, all selected options are deselected.
- 2 (reset)
- The value of the form element is reset to its initial value when it is hidden. The initial value is determined
by
value
forXTextField
s,XTextArea
s, andXSelect
s; andcheckedvalue
forXCheckbox
es
-
required
public static final XPropertyEnum required
Data type:String
Default:
0
.Available for all forms element that allow a value to be entered. If set to
0
, the form element is not required and can be left empty. Otherwise, if set to1
, the form element is required and a value must be entered.
-
requiredif
public static final XPropertyEnum requiredif
Data type:String
Default:
(no condition)
.Available for all forms element that allow a value to be entered. A form element can be made a required field automatically based on the value of another form element. This the ID of the other (referenced) form element. When the value of this property is empty, the form element is not made a required field automatically.
When this is set to the special value
FD2Const.CONDITION_VALUE_FORMULA
, the field is hidden if thecustom formula
evaluates to a truthy value.
-
requiredifcomp
public static final XPropertyEnum requiredifcomp
Data type:String
Default:
0
Available for all forms element that allow a value to be entered. A form element can be made a required field automatically based on the value of another form element. This is the condition applied to the value of the other form element. Available condition types are:
- 0 (has a value)
- The form field is a required field when the other field is non-empty.
- 1 (equals)
- The form field is a required field when the value of the other field equals the
requiredifvalue
. - 2 (does not equal)
- The form field is a required field when value of the the other field does not equal the
requiredifvalue
. - 3 (matches regular expression)
- The form field is a required field when the other field matches the regular expression contained in
requiredifvalue
. - 4 (is lower than)
- The form field is a required field when the other field's value is lower than the
requiredifvalue
. - 5 (is greater than)
- The form field is a required field when the other field's value is greater than the
requiredifvalue
. - 6 (lies between)
- The form field is a required field when the other field's value lies in the range as specified by
requiredifvalue
. Therequiredifvalue
must be a range in the formatx-y
, e.g.2-37
. - 7 (is lower than or equal to)
- The form field is a required field when the other field's value is lower than or equal to the
requiredifvalue
. - 8 (is greater than or equal to)
- The form field is a required field when the other field's value is greater than or equal to the
requiredifvalue
. - 9 (has no value)
- The form field is a required field when the other field does not have a value.
-
requiredifvalue
public static final XPropertyEnum requiredifvalue
Data type:String
Default:
(empty string)
Available for all forms element that allow a value to be entered. A form element can be made a required field automatically based on the value of another form element. This is the value against which the other form element is compared. Whether this property is required and what it must contain depends on the selected condition, see
requiredifcomp
for further details.
-
readonlyif
public static final XPropertyEnum readonlyif
Data type:String
Default:
(no condition)
.Available for all forms element that allow a value to be entered. A form element can be disabled automatically based on the value of another form element. When a form field is disabled, its value cannot be changed anymore. This the ID of the other (referenced) form element. When the value of this property is empty, the form element is not disabled field automatically.
When this is set to the special value
FD2Const.CONDITION_VALUE_FORMULA
, the field is hidden if thecustom formula
evaluates to a truthy value.
-
readonlyifcomp
public static final XPropertyEnum readonlyifcomp
Data type:String
Default:
0
Available for all forms element that allow a value to be entered. A form element can be disabled automatically based on the value of another form element. When a form field is disabled, its value cannot be changed anymore. This is the condition applied to the value of the other form element. Available condition types are:
- 0 (has a value)
- The form field is disabled when the other field is non-empty.
- 1 (equals)
- The form field is disabled when the value of the other field equals the
readonlyifvalue
. - 2 (does not equal)
- The form field is disabled when value of the the other field does not equal the
readonlyifvalue
. - 3 (matches regular expression)
- The form field is disabled when the other field matches the regular expression contained in
readonlyifvalue
. - 4 (is lower than)
- The form field is disabled field when the other field's value is lower than the
readonlyifvalue
. - 5 (is greater than)
- The form field is disabled when the other field's value is greater than the
readonlyifvalue
. - 6 (lies between)
- The form field is disabled when the other field's value lies in the range as specified by
readonlyifvalue
. Thereadonlyifvalue
must be a range in the formatx-y
, e.g.2-37
. - 7 (is lower than or equal to)
- The form field is disabled field when the other field's value is lower than or equal to the
readonlyifvalue
. - 8 (is greater than or equal to)
- The form field is disabled when the other field's value is greater than or equal to the
readonlyifvalue
. - 9 (has no value)
- The form field is disabled when the other field does not have a value.
-
readonlyifvalue
public static final XPropertyEnum readonlyifvalue
Data type:String
Default:
(empty string)
Available for all forms element that allow a value to be entered. A form element can be disabled automatically based on the value of another form element. When a form field is disabled, its value cannot be changed anymore. This is the value against which the other form element is compared. Whether this property is required and what it must contain depends on the selected condition, see
readonlyifcomp
for further details.
-
readonlyifclear
public static final XPropertyEnum readonlyifclear
Data type:String
Default:
(empty string)
Available for all forms element that allow a value to be entered. A form element can be disabled automatically based on the value of another form element. When a form field is disabled, its value cannot be changed anymore. This is a flag that indicates whether the form element is cleared when it is disabled. Can be set to one of the following options:
- 0 (keep)
- The value of the form element is not changed when it is disabled.
- 1 (clear)
- The value of the form element is cleared when it is disabled. For text input fields, the value is set to the empty string; for select fields, all selected options are deselected.
- 2 (reset)
- The value of the form element is reset to its initial value when it is disabled. The initial value is
determined by
value
forXTextField
s,XTextArea
s, andXSelect
s; andcheckedvalue
forXCheckbox
es
-
readonlyifmode
public static final XPropertyEnum readonlyifmode
Data type:String
Default:
2
Available only for
XTextField
s andXTextArea
s. A form element can be disabled automatically based on the value of another form element. When a form field is disabled, its value cannot be changed anymore. When this property is set to1
, the current value of the disabled text input field is discarded and not submitted to the server. This corresponds to the HTMLdisabled
attribute. Otherwise, when set to2
, the value is submitted to the server. This corresponds to the HTML attributereadonly
.Please note that this property is not available for other form elements as the
readonly
HTML attribute is supported only by INPUT elements.
-
label
public static final XPropertyEnum label
Data type: HTMLString
Default:
Label
Available for all form elements that allow a value to be entered. This is the text of the label indicating the purpose of the form field. Please note that this property is interpreted as an HTML snippet, so special characters such as angle brackets (
<>
) need to be escaped.
-
labeldir
public static final XPropertyEnum labeldir
Data type:String
Default:
top
Available for all elements that admit the
label
property. Indicates the position where the label is placed, relative to the form field. Available options are:- top
- The label is displayed above the form element.
- bottom
- The label is displayed below the form element.
- left
- The label is displayed to the left of the form element.
- right
- The label is displayed to the right of the form element.
- followup
- The label is displayed inside the form element. When the user enters text, the label becomes smaller and moves to the top left of the form element.
-
labelwidth
public static final XPropertyEnum labelwidth
-
legend
public static final XPropertyEnum legend
-
textalign
public static final XPropertyEnum textalign
Data type:String
Default:
left
Available for
XButtonList
s andXImage
s. Indicates how the buttons or the image should be aligned. May be one ofleft
(left alignment),center
(centered), orright
(right alignment).
-
unitwidth
public static final XPropertyEnum unitwidth
-
unit
public static final XPropertyEnum unit
Data type:String
Default:
(empty string)
Available for
XTextArea
s,XTextField
s,XUpload
s andXSelect
s. An optional text that is shown to the right of the form element. A common use case is displaying a unit such askg
orliter
next to a text input field.
-
placeholder
public static final XPropertyEnum placeholder
Data type:String
Default:
(empty string)
Available for
XTextField
s andXTextArea
s. This is an optional placeholder text that is displayed when no value was entered in the input field. This property usually corresponds to the HTML attributeplaceholder
.
-
autocomplete
public static final XPropertyEnum autocomplete
Data type:String
Default:
"on"
Available for
XTextField
s andXTextArea
s. This is an optional attribute to use the browsers autocomplete function. This property corresponds to the HTML attribute https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofillautocomplete
.
-
autocomplete_category
public static final XPropertyEnum autocomplete_category
Data type:String
Default:
(empty string)
Available for
XTextField
s andXTextArea
s. This is an optional attribute to use the browsers autocomplete function and apply to a specific category. This property corresponds to the HTML attribute https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofillautocomplete_category
.
-
autocomplete_section
public static final XPropertyEnum autocomplete_section
Data type:String
Default:
(empty string)
Available for
XTextField
s andXTextArea
s. This is an optional attribute to use the browsers autocomplete function and apply to a specific section. This property corresponds to the HTML attribute https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofillautocomplete_category
.
-
title
public static final XPropertyEnum title
Data type:String
Default:
(empty string)
Available for all form elements that allow a value to be entered and also for
XImage
s. This is an optional title that is displayed as a tooltip when the user hover over the element with the mouse cursor. This property usually corresponds to the HTML attributetitle
.
-
alt
public static final XPropertyEnum alt
-
helptext
public static final XPropertyEnum helptext
Data type: HTMLString
Default:
(empty string)
Available for all elements other that
XHeader
,XPage
s, andXFooter
. This is an optional informative description that is displayed when the user hovers over the help icon located next to the form element. Please note that this property is interpreted as an HTML snippet, so special characters such as angle brackets (<>
) need to be escaped.
-
comment
public static final XPropertyEnum comment
Data type:String
Default:
(empty string)
Available for all elements. This is an optional comment that is shown only in the designer and does not affect the rendered form in any way. This is usually used for internal comments when designing a form.
-
value
public static final XPropertyEnum value
Data type:String
Default:
(empty string)
Available for
XTextField
s,XTextArea
s, andXSelect
s. This property contains the initial value of the corresponding HTML INPUT or SELECT element. This initial value is set when the form is opened for the first time. By default, input fields and select elements are empty and do not have a value initially.
-
rtevalue
public static final XPropertyEnum rtevalue
-
buttons
public static final XPropertyEnum buttons
Data type:JSONArray
Default:
(empty array)
Available only for
XButtonList
s. This property contains the list of buttons that are displayed. The list is a JSON array, where each entry represents a button. Each button is aJSONObject
with the properties as described below.Click to show example for the value of the buttons property
[ { "optionId": "p1", "page": "p1", "check": "false", "value": "Pagina p1" }, { "optionId": "p1 + check", "page": "p1", "check": "true", "value": "Pagina p1 + controle" }, { "optionId": "submit + check", "page": "submit", "check": "true", "value": "Verwerken + controle" }, { "optionId": "submit", "page": "submitNoCheck", "check": "false", "value": "Verwerken" }, { "optionId": "submit no save", "page": "submitPreview", "check": "false", "value": "Indienen" }, { "optionId": "submit no save popup", "page": "submitPreviewWindowed", "check": "false", "value": "Indienen + popup" }, { "optionId": "save + check", "page": "submitSave", "check": "true", "value": "Bewaren + controleren" }, { "optionId": "save", "page": "submitSaveNoCheck", "check": "false", "value": "Bewaren" }, { "page": "-1", "check": "false", "value": "Geen actie", "optionId": "no action" } ]
- name (type
String
) - The name of the button which is used as the value of
name
attribute of the button. Please note that this is not the text that is displayed to the user (for that, seevalue
) - title (type
String
) - An optional tooltip for the button that is shown when the user hovers of the button with the mouse or a pointer.
- value (type
String
) - The text on the button that is shown to the user.
- action (type
JSONObject
) - The action of the button that describes what should happen when the button is pressed. This is another
JSONObject
with the following properties: - check (type
String
) - Either
true
to indicate the current page should be validated when the button is pressed, orfalse
otherwise. - value (type
String
) - The name of the that is performed when the button is pressed. This is the value as it can be selected in the
designer, such as
page p1
orVerwerken + controle
. Please note that this value depends on the selected language and should not be used by code to check the action. - page (type
String
) - When the button is used for switching to a different page, this is the name of that page. Otherwise, this is
the ID of the action that is performed when the button is pressed. Must be one of the following:
- submit: Validates the current page; and if it is valid, submits the form. Otherwise, highlights the error.
- submitNoCheck: Submits the form and send the data to the server, without prior validation.
- submitPreview: Submit the form and runs the workflow, but does not create a new form record.
- submitPreviewWindowed: Same as
submitPreview
, but displays the response from the server in a popup window. - submitSave: Validates the form; and if it is valid, saves the current form data on the server. The user receives a link they can use to open the form again and finish filling out the form. If the current page is not valid, highlights the error.
- submitSaveNoCheck: Saves the current form data on the server, without prior validation. The user receives a link they can use to open the form again and finish filling out the form.
- -1: Performs no action when the button is pressed. Custom actions can be set up via JavaScript.
- <page-name>: Must be the name of an existing page. Switches to that page when the button
is pressed. Whether the current page is validated before switching depends on the value of
check
.
- optionId (type
String
) - ID of the action that is performed when the button is pressed. Must be one of the following:
- submit + check: Validates the current page; and if it is valid, submits the form. Otherwise, highlights the error.
- submit: Submits the form and send the data to the server, without prior validation.
- submit no save: Submit the form and runs the workflow, but does not create a new form record.
- submit no save popup: Same as
submitPreview
, but displays the response from the server in a popup window. - save + check: Validates the form; and if it is valid, saves the current form data on the server. The user receives a link they can use to open the form again and finish filling out the form. If the current page is not valid, highlights the error.
- save: Saves the current form data on the server, without prior validation. The user receives a link they can use to open the form again and finish filling out the form.
- no action: Performs no action when the button is pressed. Custom actions can be set up via JavaScript.
- <page-name> + check:Validates the current page; and if it is valid, switches to that
page. Otherwise, highlights the error. Example:
p1 + check
orpCarDetails + check
. - <page-name>: Must be the name of an existing page. Switches to that page when the button
is pressed, without prior validation. Example:
p1
orpCarDetails
.
- name (type
-
options
public static final XPropertyEnum options
Data type:JSONArray
Default:
(empty array)
Available only for
XSelect
s. This property contains the list of options for the select element. It must be a JSON array with one entry for each option. Each entry is aJSONObject
with the following properties:- text (type
String
) - The text of the select option that is displayed to the user.
- title (type
String
) - An optional tooltip that is displayed when the user hovers over the select option with the mouse or pointer.
- value (type
String
) - The value of the select option that is sent to the server when the form is submitted.
- text (type
-
questions
public static final XPropertyEnum questions
Data type:JSONArray
Default:
(empty array)
Available only for
XSelect
s whenselectlayout
is set to eithertable
ortable1
(a table with a list of questions that can be answered with one of the availableoptions
. This property contains the list of available questions, as aJSONArray
. Each entry of the JSON array must be aJSONObject
with the following properties:- value
- The text of the question that is shown to the user (first row in the table of questions)
-
checkedvalue
public static final XPropertyEnum checkedvalue
-
checkboxvalue
public static final XPropertyEnum checkboxvalue
-
image
public static final XPropertyEnum image
-
fullwidth
public static final XPropertyEnum fullwidth
-
imagelink
public static final XPropertyEnum imagelink
-
imagetarget
public static final XPropertyEnum imagetarget
-
imagegallerie
public static final XPropertyEnum imagegallerie
-
imagegroup
public static final XPropertyEnum imagegroup
-
imagequality
public static final XPropertyEnum imagequality
-
datasource
public static final XPropertyEnum datasource
-
appointmentTemplate
public static final XPropertyEnum appointmentTemplate
Data type:String
Default:
(empty string)
Available only for
XAppointment
s. The UUID of an appointment template to be used for booking appointment and finding free dates. When no appointment template is set, no appointments can be booked.
-
dstype
public static final XPropertyEnum dstype
Data type:String
Default:
(empty string)
Available only for
XSelect
s. The type of the data source that is used for the select options. Must be one of the following:- USER
- Uses the configured
options
. - PLUGIN
- Uses a plugin data source.
- DB
- Uses a database query as the data source.
- CSV
- Uses a static CSV file as the data source.
- LDAP
- Uses an LDAP query as the data source.
- XML
- Uses a static XML file as the data source.
- JSON
- Uses a static JSON file as the data source.
-
dstextidx
public static final XPropertyEnum dstextidx
Data type:String
Default:
1
Available only for
XSelect
s. When adatasource
is set: The 1-based index of the column that contains the text of the select option that is shown to the user.
-
dsvalueidx
public static final XPropertyEnum dsvalueidx
Data type:String
Default:
2
Available only for
XSelect
s. When adatasource
is set: The 1-based index of the column that contains the value of the select option that sent to the server when the form is submitted.
-
datepicker
public static final XPropertyEnum datepicker
Data type:String
Default:
1
Available only for
XTextField
s. Applies only whendatatype
is set to a date-like data type, such asdateDE
ordateEN
. If this attribute is set to1
, a date picker UI widget is shown in the form that lets the user pick a date more easily. Otherwise, when set to0
, no date picker is shown, requiring the user to enter a date in a text input field.
-
uploadMode
public static final XPropertyEnum uploadMode
Data type:String
Default:
native
.Available only for
XUpload
. Controls how files are uploaded. Possible values are:- native
- The default. Uses the native upload mechanism, which sends the files with the form data when the form is submitted.
- ajax
- Uploads the files to the server as soon as the user selects the file. This also enables advanced features such as a progress indicator.
-
datatype
public static final XPropertyEnum datatype
Data type:String
Default:
text
Available only for
XTextField
s andXTextArea
s. The data type is used during form validating to ensure the entered data conforms to a certain format. The following built-in data types are currently available:- dateDE
- Allows only German-style dates (DD.MM.YYYY), e.g.
22.05.1990
. - Allows only valid (international) email addresses, e.g.
james@john.org
orθσερ@εχαμπλε.ψομ
. - integer
- Allows only integers, that is numbers without a decimal point, e.g.
3
,0
, or-21
. - ipv4
- Allows only IP4 addresses, e.g.
127.0.0.1
or10.42.42.13
. - money
- Requires the input to be a valid amount of money, i.e. a number with exactly two decimal digits, e.g.
2,00
,-3,95
,0,00
or897345,38
. - number
- Allows only numbers, including numbers with a decimal point, e.g.
0.03
,,-99.2
, or42
. - onlyLetterNumber
- Allows only letters, numbers, and spaces.
- onlyLetterSp
- Allows only letters and spaces.
- phone
- Allows only valid phone numbers, e.g.
0234995483
or+49 351 4459654
. - plzDE
- Allows only postal code from Germany, i.e. exactly 5 digits, e.g.
02349
. Does not check whether such a code is actually registered within Germany. - posinteger
- Allows only positive integers, e.g.
0
,3
, oder123
. - posmoney
- Requires the input to be a valid amount of money, not including negative numbers, e.g.
0,00
or2,34
. - posmoneyOptionalComma
- Requires the input to be a valid positive amount of money, with the decimal digits being optional, e.g.
0,00
,0
,3,4
, or3
. - regexp
- Allows the user to enter a custom (JavaScript flavor) regular expression for validation, see
vrule
. - text
- Applies no restriction and allows every input.
- time
- Requires the input to be a valid time, in the format
hh:mm
, e.g.22:05
or03:42
. - url
- Allows only URLs, including the protocol, e.g.
http://example.com
orhttps://www.james.org
.
-
showCapacity
public static final XPropertyEnum showCapacity
Data type:String
Default:
0
Available only for
XAppointment
s. Describes if the amount of free appointments slots (capacity) should be appear in the appointment picker."
-
showUntil
public static final XPropertyEnum showUntil
Data type:String
Default:
0
Available only for
XAppointment
s. Describes if the end time should be appear in the appointment picker."
-
closeable
public static final XPropertyEnum closeable
Data type:String
Default:
0
Available only for
XAppointment
s. Describes if appointment picker can be closed an appear as usual input field."
-
dateFormat
public static final XPropertyEnum dateFormat
Data type:String
Default:
dd.mm.yy
Available only for
XAppointment
s. Describes the format dates will appear in the appointment picker. "Custom means the Property dateFormatCustom will be used."
-
dateFormatCustom
public static final XPropertyEnum dateFormatCustom
Data type:String
Default:
dd.mm.yy
Available only for
XAppointment
s. Describes the format dates will appear in the appointment picker when dateFormat equals "Custom".
-
requiredgroup
public static final XPropertyEnum requiredgroup
Data type:String
Default:
(empty)
Available for all elements that support
required
. The required group to which the form field belongs. If a form element is part of a required group, the form is invalid when no element of the required group has a value. The form becomes valid once the user has filled in at least one form field of the required groups.
-
vrule
public static final XPropertyEnum vrule
Data type:String
Default:
(empty)
Applicable when
datatype
was set toregexp
. This is the regular expression that is used to validate the form field. This must be a valid JavaScript regular expression. Usually it is recommend to use the anchors^...$
to ensure the whole input conforms to the pattern.
-
maxlength
public static final XPropertyEnum maxlength
Data type:String
Default:
255
Available for
XTextField
s,XTextArea
s, andXUpload
s. The maximum length of the input that is allowed. If set to0
, the length is unlimited. ForXTextField
s andXTextArea
s, the length of the entered text is checked. ForXUpload
s, the length of the file name is checked.- See Also:
minlength
,maxfilesize
-
minlength
public static final XPropertyEnum minlength
Data type:String
Default:
0
Available for
XTextField
s andXTextArea
s. The minimum number of characters that must be entered in a text field or text area. Please note that this restriction is applied only when the form field is not empty. Thus, when set to0
, the form field is never invalid due to this property. To enforce that the user does not leave the form field empty, userequired
.
-
minvalue
public static final XPropertyEnum minvalue
Data type:String
Default:
(empty)
Applicable when
datatype
is set to a numerical data type, such asinteger
. The minimum numerical value (inclusive) that must be entered. Contrast this withminlength
, which checks the number of characters, not the numerical value these characters represent. When empty, no restriction is applied.
-
maxvalue
public static final XPropertyEnum maxvalue
Data type:String
Default:
(empty)
Applicable when
datatype
is set to a numerical data type, such asinteger
. The maximum numerical value (inclusive) that must be entered. Contrast this withmaxlength
, which checks the number of characters, not the numerical value these characters represent. When empty, no restriction is applied.
-
checkboxmin
public static final XPropertyEnum checkboxmin
Data type:String
Default:
(empty)
Available only for
XSelect
. Applies only whenselectlayout
is set toradio
,radio1
,checkbox
,checkbox1
,table
, ortable1
. The minimum number of checkboxes or radio buttons that must be checked or selected. When empty, no restriction is applied.- See Also:
checkboxmax
-
checkboxmax
public static final XPropertyEnum checkboxmax
Data type:String
Default:
(empty)
Available only for
XSelect
. Applies only whenselectlayout
is set toradio
,radio1
,checkbox
,checkbox1
,table
, ortable1
. The maximum number of checkboxes or radio buttons that must be checked or selected. When empty, no restriction is applied.- See Also:
checkboxmin
-
maxfilesize
public static final XPropertyEnum maxfilesize
-
equals
public static final XPropertyEnum equals
Data type:String
Default:
(empty)
Only available for
XTextField
s andXTextArea
s currently. When not empty, this property refers to theid
of another form field that must have the same value as the form field. The form field is invalid if the value of the form field is different compared to the value of the referenced form field.
-
fileextension
public static final XPropertyEnum fileextension
Data type:String
Default:
(empty)
Available only for
XUpload
s. A comma separated list of file extensions (without the leading period) an uploaded file must have, such asxml,js
. An upload field is invalid if a file with a different file extension is selected. When empty, all extensions are allowed.
-
fileoutputalias
public static final XPropertyEnum fileoutputalias
-
vrulemismatch
public static final XPropertyEnum vrulemismatch
Data type:String
Default:
(empty)
Applicable when
datatype
was set toregexp
. This is the message that is displayed to the user when the value of a form field does not matched thevrule
regular expression. If not set, a generic error message is displayed.- See Also:
vrule
-
servervalidate
public static final XPropertyEnum servervalidate
Data type:String
Default:
(empty)
Available for all elements that submit a value (
IXValuableItem
). When set to1
, the value submitted for the form field is validated on the server. Otherwise, no server-side validation is performed. UseIXItemBasic.validate(de.xima.fc.form.common.models.IXValidationParams)
andIXItemBasic.validateGlobal(de.xima.fc.form.common.models.IXGlobalValidationParams)
to customize how form element widgets are validated.
-
flex
public static final XPropertyEnum flex
Data type:String
Default:
1
Required for all elements that can be arranged horizontally in a row next to other form elements, i.e.
XButtonList
,XCheckbox
,XContainer
,XFieldSet
,XImage
,XLine
,XSelect
,XSpacer
,XSpan
,XTextArea
,XTextField
, andXUpload
. This is the relative width as a dimensionless number that can also be edited in the designer. Thecomputedwidth
is calculated by taking the ration of this property and dividing by the sum of theflex
values of all items in the same row.
-
catalogue
public static final XPropertyEnum catalogue
Data type:String
Default:
(empty)
Available only for catalogs plugins (
IPluginFormElementCatalogue
). The (not necessarily unique) ID of the catalog.
-
cataloguename
public static final XPropertyEnum cataloguename
Data type:String
Default:
(empty)
Available only for catalogs plugins (
IPluginFormElementCatalogue
). Either just the catalog ID or a human readable name of the catalog.
-
catalogueitem
public static final XPropertyEnum catalogueitem
Data type:String
Default:
(empty)
Available only for catalogs plugins (
IPluginFormElementCatalogue
). The ID of an item in the catalog.
-
catalogueunique
public static final XPropertyEnum catalogueunique
Data type:String
Default:
(empty)
Available only for catalogs plugins (
IPluginFormElementCatalogue
). An arbitrary, unique ID for the catalog.
-
cataloguelabel
public static final XPropertyEnum cataloguelabel
Data type:String
Default:
Label
Available only for catalogs plugins (
IPluginFormElementCatalogue
). The label of the catalog that is shown in the UI.
-
dynamic
public static final XPropertyEnum dynamic
Data type:String
Default:
0
Can be added to input elements to allow marking an element as repeated, i.e.
XContainer
,XFieldSet
,XSelect
,XTextArea
,XTextField
, andXUpload
. When set to1
, the element is repeated and the user can use the plus and minus buttons to create one or multiple copies of the form element. Otherwise, when set to0
, the element cannot be repeated.
-
dynamicMinSize
public static final XPropertyEnum dynamicMinSize
-
dynamicMaxSize
public static final XPropertyEnum dynamicMaxSize
-
dynamicTrigger
public static final XPropertyEnum dynamicTrigger
Data type:String
Default:
(empty)
Required for all elements that have the property
dynamic
enabled. This property can be edited in the designer only whendynamic
is activated. This is theid
of another form element whose value controls the number of repetitions of this element. For example, when the dynamic trigger is set to anotherXTextField
and the user enters4
in that text field, this will cause this element to have 4 repetitions (either by adding new repetitions or removing existing repetitions).
-
dynamicHideButtons
public static final XPropertyEnum dynamicHideButtons
Data type:String
Default:
(empty)
Required for all elements that have the property
dynamic
enabled. This property can be edited in the designer only whendynamic
is activated. When this property is set to1
, the plus and minus buttons for adding and removing repetitions are hidden. Otherwise, when set to0
, the buttons are shown normally. Hiding the buttons may be useful when the number of repetitions should be controlled only by thedynamicTrigger
.
-
cssclasses
public static final XPropertyEnum cssclasses
Data type:JSONArray
Default:
(empty array)
Available for all form elements. A list of additional classes that are added to the form element (not its container element). Each entry in this array must be a string representing the CSS class to be added.
-
cssclasseswrapper
public static final XPropertyEnum cssclasseswrapper
Data type:JSONArray
Default:
(empty array)
Available for all form elements. A list of additional classes that are added to the container of the form element. Each entry in this array must be a string representing the CSS class to be added.
-
attributes
public static final XPropertyEnum attributes
Data type:JSONArray
Default:
(empty array)
Available for all form elements. A list of custom HTML attributes that are added to the rendered form element (not its container element). Each entry in this array must be an object with the following properties:
- text
- The name of the HTML attribute, e.g.
data-my-custom-attribute
. - value
- The value of the HTML attribute.
data-
.
-
custom_attributes
public static final XPropertyEnum custom_attributes
Data type:JSONArray
Default:
(empty array)
Available for all form elements. A list of custom HTML attributes that are added to the rendered form element (not its container element). Each entry in this array must be an object with the following properties:
- text
- The name of the HTML attribute, e.g.
data-my-custom-attribute
. - value
- The value of the HTML attribute.
data-
.
-
i18n
public static final XPropertyEnum i18n
Data type:JSONObject
Default:
(empty object)
Available for all elements. Contains a list of translations for all translatable properties. A form is always requested in a particular language. When a translation for that language is available, it is used. Otherwise, the default value of the corresponding
XPropertyEnum
is used.The keys of this object are language tags, such as
de
oren
. Each value is anotherJSONObject
with the property name (Enum.name()
) as the key and the translated text as the value. For example, this could look as follows:{ "de": { "label": "<p>German label</p>\n", "helptext": "<p>German help</p>\n", "placeholder": "German placeholder" }, "fr": { "label": "<p>French label</p>\n", "helptext": "<p>French help</p>\n", "placeholder": "French placeholder" } }
This would define a German and French value for thelabel
,helptext
, andplaceholder
properties.
-
statusdependent
public static final XPropertyEnum statusdependent
Data type:String
Default:
(empty)
Available for all form elements. When set to
1
, the form element is available only when the form record is currently in one of the states as indicated byviewstatus
.
-
viewstatus
public static final XPropertyEnum viewstatus
Data type:JSONArray
Default:
(empty array)
Available for all form elements. Applicable only when
statusdependent
is set to1
. A list of state descriptors of which at least one must match the current state of the form record. When no state descriptor matches, the form element is not available, i.e. it is not included in the rendered form and no values for that form element are accepted when the form is submitted. A state descriptor is a string that is either- the string literal
-1
, which matches every state, or - the name of a state as set in the workflow configuration.
[!]
, in which case it matches when the form record is not in that state. For example, if this property is set to["[!]-1", "Received"]
, the form element is available if the form record has no state, the form record is in the stateReceived
, or both conditions apply. - the string literal
-
usergrouppendent
public static final XPropertyEnum usergrouppendent
Data type:String
Default:
(empty)
Available for all form elements. When set to
1
, the form element is available only when the user belongs to one of the user groups as as indicated byviewusergroup
.
-
viewusergroup
public static final XPropertyEnum viewusergroup
Data type:JSONArray
Default:
(empty array)
Available for all form elements. Applicable only when
usergrouppendent
is set to1
. A list of user group descriptors of which at least one must match one of the user groups of the user who opened the form. When no user group descriptor matches, the form element is not available, i.e. it is not included in the rendered form and no values for that form element are accepted when the form is submitted. A user group descriptor is a string that is either- the string literal
-1
, which matches every user group, or - the name of a user group as defined in the backend user group configuration menu.
[!]
, in which case it matches when the user does not belong to that user group. For example, if this property is set to["[!]-1", "Admin"]
, the form element is available if user does not belong to any group, the user belongs to the user groupAdmin
, or both conditions apply. - the string literal
-
readonly_statusdependent
public static final XPropertyEnum readonly_statusdependent
Data type:String
Default:
(empty)
Available for all form elements. When set to
1
, the form element is editabble only when the form record is currently in one of the states as indicated byreadonly_viewstatus
.
-
readonly_viewstatus
public static final XPropertyEnum readonly_viewstatus
Data type:JSONArray
Default:
(empty array)
Available for all form elements. Applicable only when
readonly_statusdependent
is set to1
. A list of state descriptors of which at least one must match the current state of the form record. When no state descriptor matches, the form element is not editable, i.e. it is included in the rendered form, but its value cannot be changed. Please note that this is not checked by the server currently. A state descriptor is a string that is either- the string literal
-1
, which matches every state, or - the name of a state as set in the workflow configuration.
[!]
, in which case it matches when the form record is not in that state. For example, if this property is set to["[!]-1", "Received"]
, the form element is editable if the form record has no state, the form record is in the stateReceived
, or both conditions apply. - the string literal
-
readonly_usergrouppendant
public static final XPropertyEnum readonly_usergrouppendant
Data type:String
Default:
(empty)
Available for all form elements. When set to
1
, the form element is editable only when the user belongs to one of the user groups as as indicated byreadonly_viewusergroup
.
-
readonly_viewusergroup
public static final XPropertyEnum readonly_viewusergroup
Data type:JSONArray
Default:
(empty array)
Available for all form elements. Applicable only when
readonly_usergrouppendant
is set to1
. A list of user group descriptors of which at least one must match one of the user groups of the user who opened the form. When no user group descriptor matches, the form element is not editable, i.e. it is included in the rendered form, but its value cannot be edited. Please note that this is not checked by the server currently. A user group descriptor is a string that is either- the string literal
-1
, which matches every user group, or - the name of a user group as defined in the backend user group configuration menu.
[!]
, in which case it matches when the user does not belong to that user group. For example, if this property is set to["[!]-1", "Admin"]
, the form element is editable if user does not belong to any group, the user belongs to the user groupAdmin
, or both conditions apply. - the string literal
-
print_hide
public static final XPropertyEnum print_hide
Data type:String
Default:
0
Available for all form elements. Controls whether the form element is shown when the form is printed. When
0
, the form element is included in the printed version; and omitted when this property is set to1
."Printed" here currently only refers to the PDF or Microsoft Word export feature.
-
print_list
public static final XPropertyEnum print_list
Data type:String
Default:
1
Available only for
XSelect
s. Controls the layout of the select element when the form is printed. There are two ways how a select element can be rendered in the printed version. As an empty text field the user can fill out manually. Or as a list of predefined options with a checkbox where the user can put a check mark.When set to
1
, a list of options is always used. When set to2
, a text field is used. Otherwise, when set to0
, the output style is determined automatically based on the number of options: a list of options if there are less than10
options, or a text field otherwise."Printed" here currently only refers to the PDF or Microsoft Word export feature.
-
print_text_only
public static final XPropertyEnum print_text_only
Data type:String
Default:
1
Available for all elements with a (label) text, such as
XCheckbox
es,XSelect
s,XSpan
s,XTextArea
s, andXTextField
s. Controls whether HTML markup is allowed. When set1
, all HTML tags are removed and only the text content is used."Printed" here currently only refers to the PDF or Microsoft Word export feature.
-
print_max_column_count
public static final XPropertyEnum print_max_column_count
Data type:String
Default:
1
Available for all form elements. Controls how many columns are allowed to be used for elements which will be put into a table layout when the form is printed. When
0
, no table layout will be used"Printed" here currently only refers to the PDF or Microsoft Word export feature.
-
print_func
public static final XPropertyEnum print_func
Data type:String
Default:
(empty)
Available for all elements with a value (
IXValuableItem
). When not empty, the value of this property is interpreted as a Word fill function that is written to the exported Word document. That Microsoft Word document can then be used with a workflow action of typeWord fill
. When the word document is filled with the submitted form data, the Word fill function is evaluated. For example, you can enterrmr()
or.rmr()
(with or without the leading period) to remove the table row with the current element in case its value is empty."Printed" here currently only refers to the PDF or Microsoft Word export feature.
-
print_break
public static final XPropertyEnum print_break
Data type:String
Default:
0
Available for all form elements. Controls whether a page break is inserted in the printed version. Can be one of the following values:
- 0
- Does not enforce a page break. A page break is inserted only when the form element does not fit on the page anymore.
- 1
- Always inserts a page break before the form element.
- 2
- Always inserts a page break after the form element.
"Printed" here currently only refers to the PDF or Microsoft Word export feature.
-
print_size
public static final XPropertyEnum print_size
Data type:String
Default:
(empty)
Available for all elements with a (label) text or value text, such as
XCheckbox
es,XSelect
s,XSpan
s,XTextArea
s, andXTextField
s. Controls the font size of the text. This is interpreted as a font size in points (not pixels). When no value is set, an appropriate default is used."Printed" here currently only refers to the PDF or Microsoft Word export feature.
-
print_border
public static final XPropertyEnum print_border
Data type:String
Default:
1
Available for all elements with a (label) text or value text, such as
XCheckbox
es,XSelect
s,XSpan
s,XTextArea
s, andXTextField
s. Controls whether border should be rendered around the element when the form is printed."Printed" here currently only refers to the PDF or Microsoft Word export feature.
-
serveronly
public static final XPropertyEnum serveronly
-
-
Method Detail
-
values
public static XPropertyEnum[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (XPropertyEnum c : XPropertyEnum.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static XPropertyEnum valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getClazz
public Class<?> getClazz()
- Returns:
- The class of the data type of this property, such as
String
orJSONArray
.
-
getDefaultValue
public Serializable getDefaultValue()
- Returns:
- The default value of this property that should be used when no other value was provided.
-
contains
public static boolean contains(String name)
- Parameters:
name
- The name of a property to check.- Returns:
true
if anXPropertyEnum
with the given name exists, orfalse
otherwise.
-
-