Closed RaziaMahmodi closed 12 months ago
This is logically not possible since our data is filled from JSON which is fluid. However, the administrator can solve this problem by making use of sortable keys as they would like the data to be shown to the user e.g numeric values can be added in front of the the keys (1..., 2...)
Thanks @sundayAdu . Let's discuss on a Thursday meeting
As per discussion, the better solution can be adding another key as key order to be able to sort the items based of on.
In order to achieve this, simply add the "order" attribute to the JSON construction as shown in the sample below
{
"type": "dropdown",
"id": "LotClusterNo",
"caption": "Lot Cluster Number",
"important": "true",
"options": [
{"key":"2","caption":"Sungba","order":"1"},
{"key":"1","caption":"Zebra","order":"5"},
{"key":"3","caption":"Monkey","order":"2"},
{"key":"6","caption":"Frogs","order":"3"},
{"key":"5","caption":"Toads","order":"4"},
{"key":"4","caption":"Lions","order":"0"}
]
}
@DevSeg great, thanks!
Forms dropdown list order should be based on the order in JSON forms.
Example 1:
Example 2: