Community
Feature requests for the formElementsTable
about 4 years ago by Eetu Tarkamo
I have a couple of feature requests. These are not critical, but something that came to mind while working on some forms.
- Would it be possible to use the 'required' attribute to refer to another element in the formElementsTable?
Like the example below:
elements: [
{
type: "select",
width: "col-md-2",
name: "protocol",
required: true,
options: [{
label: "TCP",
value: "TCP"
}, {
label: "UDP",
value: "UDP"
},{
label: "ICMP",
value: "ICMP"
}]
},{
type: "textField",
pattern: "^[0-9]{1,4}$",
width: "col-md-3",
name: "port",
required: {
ifField: 'protocol',
hasValue: 'ICMP'
}
}]
In my understanding the name refers to the attribute of the object itself in the array, so this solution does not seem work between the elements on the tables.
- Would it be possible to define a minimum or maxinum number of rows in the formElementsTable? With the 'add', 'remove' and 'copy' functions, it might come in handy to define the max number of rows that the user can add to the table. For example to define a maximum number of devices they car order or a minimum number of contact persons to add to an asset.
Thanks in advance!