JSON example for SelectBox

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
k2R400
Profound User
Posts: 62
Joined: Sat Feb 18, 2012 12:03 pm
First Name: Patrick
Last Name: THOMAS
Company Name: Oo2
Country: France
Contact:

JSON example for SelectBox

Post by k2R400 »

Hello,

I try to load a Select Box from a choice URL.
Below a JSON who work perfectly with an auto complete text box, but not with a Select Box

Code: Select all

{
    "success": true,
    "response": {
        "results": [
            {
                "option": "Monsieur",
                "value": 1
            },
            {
                "option": "Madame",
                "value": 2
            },
            {
                "option": "Mademoiselle",
                "value": 3
            }
        ]
    }
}
Can you post an exemple of a valid JSON for a Select Box ?

TY in advance
SeanTyree
Profound User
Posts: 76
Joined: Fri Jan 11, 2013 6:11 pm
First Name: Sean
Last Name: Tyree
Company Name: US HealthWorks
State / Province: California
Zip / Postal Code: 91355
Country: United States
Contact:

Re: JSON example for SelectBox

Post by SeanTyree »

Patrick,

The formatting for the select box json should be:

Code: Select all

{
    "success": true,
    "response": [
            new Option("Monsieur", "1"),
            new Option("Madame", "2"),
            new Option("Mademoiselle", "3")
    ]
}
Sean
k2R400
Profound User
Posts: 62
Joined: Sat Feb 18, 2012 12:03 pm
First Name: Patrick
Last Name: THOMAS
Company Name: Oo2
Country: France
Contact:

Re: JSON example for SelectBox

Post by k2R400 »

Thank you Sean !!!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest