Community
Feature Request - DropDown/formElemet empty row
When we are using formElemet with `type 'select'` and parameter `required: true'` the dropdown list automatically gets an empty/blank row.
The blank row should be automatically hidden if the dropdown is set to requiered.
**See attached image for example**
![img](https://i.postimg.cc/g0MXxYK6/img.png)
Posted by Patrick over 3 years ago
Feature requests for the formElementsTable
I have a couple of feature requests. These are not critical, but something that came to mind while working on some forms.
1. 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.
2. 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!
Posted by Eetu Tarkamo over 3 years ago
Two feature request - workspace and form
1. We would like to be able to prevent browsing to a hidden workspace that is not configured as a browseable, this still needs to be usable via the form lookup...
Currently if you have a hidden workspace and a form is not limited with roles, that form is usable to anyone via hidden workspace that has no roles set up.
2. Option to list workspaces in form configuration which workspace is allowed to access to this form.
Currently we can only limit form usage in the pug with this code:
block formContent
if(form.queryparam.workspace != 'workspace_name')
h2 Wrong workspace!
else
Posted by Markus Kalske over 3 years ago
Request: Dynamic readonly for a form element
Ability to set readonly for a form element to true or false based on selection in the form
Posted by Henrik Andersson over 3 years ago
How do I change text in a form?
I want to make some changes to the text in the form. How do I do that?
Posted by Robert Lundsten about 4 years ago
Is it possible to put default values to the lookup fields that use indexed items?
A customer requested a feature where they could reuse the filled form to make a second order with mostly similar values.
Is it possible to define a default value to the lookup fields that search indexed items / options?
The example element below:
```
+formElement[{
type: 'itemSelect',
width: "col-md-3",
name: 'faculty',
label: t('form.vmorder.faculty_label'),
required: 'true',
lookup: {
type: "item",
workspace: "lookup",
query: "filter=tag:laiterekisteri&term={searchstring}",
sort: "name,asc",
result: {
value: "{item.key}",
label: "{item.name}, {item.key}"
}
}
}
```
Posted by Eetu Tarkamo about 4 years ago
Euro sign in summary calculation field?
How do I add euro sign into summaryCalculation field?
Here's my example:
formElement({
type: "summaryCalculation",
name: "totalcost",
itemTable: "products",
calculation: "{price} * {amount}",
format: "0,0[.]00",
label: "Summa"
})
Posted by Perttu Määttä about 5 years ago
Conditional confirmation output
I have a script that can return 2 different table output
How could make a condition to show only certain table or even better would be just format tableheader to have just either result headers?
block formContent
+formElement({
type: "agentTaskLog",
autorefresh: 2000
})
+formElement({
charset: "utf8",
type: "agentTaskSubmitResult",
format: "table",
tableHeader: "PVM,Sentteri_Id,Konenimi,System,Toimenpide,Lopputulos,Viivakoodi",
loadingText: "Please wait while getting Events from selected computer...",
autorefresh: 2000
})
+formElement({
charset: "utf8",
type: "agentTaskSubmitResult",
format: "table",
tableHeader: "PVM,Konenimi,Konenimi,AD_Terminated,Verkko_Terminated,Laiterekisteri_Terminated,SCCM_Terminated",
loadingText: "Please wait while getting Events from selected computer...",
autorefresh: 2000
})
Posted by Markus over 5 years ago