Hi,
in Bonita 7 UI Designer, I have a form with select widget.
The available values are: (Rest/Json) persons [{‘1’,‘Pippo’},{‘2’,‘Pluto’},{‘1’,‘Topolino’}]
I have a variable selectedPerson {‘2’,‘Pluto’}
When I load the form, I want that Pluto is selected!
How can I do?
Thanks
Manolo
You use the “Displayed Key” to show the correct value, in this case you should set it to 2…I think…
regards
Sean
Hi,
If you configure the widget in the following way, it will work:
Available values:
[
{"id":1, "label":"Pippo"},
{"id":2, "label":"Pluto"},
{"id":3, "label":"Topolino"}
]
Displayed key: label
Returned key: id
Value: 2
Cheers,
Como genero un formInput dinamico?
The SOLUTION:
You need to set it in quotes.
Like this:
Bild
hi how are you, can you help me, i have a widget select in my form UI Designer, i want populate whith data of mysql how i can do this?
hi my friend, thanks for your help, but When I sending data not (value) appears.
Sorry but I did not understand your last comment.
Assuming you did not understand how to initialize and send the data, here is how you should do it:
- Use a
JSON
variable users
to set the list of your users and use it in the “Available values” of your widget.
- Set the following value to
formInput
: { "userId" : 2}
and use this variable as your widget “Value”.
- Set the following value to
formOutput
: return {"userId" : $data.formOutput.userId};