Comma Seperated Selected Values

JSON Encoded Selected Values

In this example we've added the selected-value-encoding="json" attribute. This means that the selected-value= attribute is expected to be in JSON that has also been URI encoded with encodeURIComponent() (or something else that does the same job).

In this case the selected value looks like selected-value="%5B%22Hoki%22%2C%22Gibberfish%22%5D"

Which is a URL Encoded JSON array that is just a list of strings.

["Hoki","Gibberfish"]

JSON Encoded Selected Values (for a Single Select)

This might be less common but you can use selected-value-encoding="json" in single select mode.

In this case the selected value looks like selected-value="%22Loach%22"

Which is a URL Encoded JSON string.

"Loach"