Select a value in select widget

1
0
-1

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

Comments

Submitted by rodrigojcortes on Thu, 09/10/2015 - 15:41

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?

4 answers

1
0
-1

The SOLUTION:

You need to set it in quotes.

Like this:

de.png
Bild

1
0
-1

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,

Comments

Submitted by rodrigojcortes on Fri, 09/11/2015 - 16:34

hi my friend, thanks for your help, but When I sending data not (value) appears.

Submitted by philippe.ozil on Mon, 09/14/2015 - 14:11

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};

1
0
-1

You use the "Displayed Key" to show the correct value, in this case you should set it to 2...I think...

regards
Sean

1
-6
-1

Como genero un formInput dinamico?

Notifications