Support template data options by adding property attribute with an array of prompts and values. Additionally add a multiple property, which indicates multiple values are suppored if set to "true".
- Add an optional property to the
data
object: option (array of objects. prompt/value pair) - Add an optional property to the
data
object: multiple (boolean). This property has no impact if option property is not set.
{ "collection" :
{
"version" : "1.0",
"href" : "http://example.org/users",
"template" : {
"data" : [
{ "name" : "username", "value" : "", "prompt" : "User name", "required" : "true" },
{ "name" : "country", "value" : "", "prompt" : "Country", "multiple" : "false", "options" : [ { "prompt" : "Germany", "value" : "de" }, { "prompt" : "Poland", "value" : "pl" } ] },
{ "name" : "talents", "value" : "", "prompt" : "Talents", "required" : "true", "multiple" : "true", "options" : [ { "prompt" : "Swimming", "value" : "swimming" }, { "prompt" : "Climbing", "value" : "climbing" }, { "prompt" : "Socializing", "value" : "socializing" } ] },
]
}
}
}