Autocomplete to support JSON response

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Autocomplete to support JSON response

masha.knezevic
Hi all,

I'm trying to retrieve data to fill the autocomplete dropdown in Orbeon
Forms, but I'm receiving a json file in the response.
In the Form Builder, I'm supposed to add Items, Label and Value for the
autocomplete.
The response I'm getting is something like

{"status":"success","code":200,"data":{"streets":[{"name":"Street
One","id":"1"},{"name":"Street Two","id":"2"},{"name":"Street
Three","id":"3"}]}}

How can I parse this data and fill the autocomplete?

I've seen this https://doc.orbeon.com/xforms/submission-json.html and tried
to use it as a reference, but without any luck. Can someone help me with
this?

Thanks in advance!

Kind regards,
Masa

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Autocomplete to support JSON response

Alessandro  Vernet
Administrator
Hi Masa,

I think this question was crossposted on Stack Overflow, where I already
replied, so I suggest we continue the discussion there. And of course, just
let me know if I missed something and this is about something different.

https://stackoverflow.com/questions/49301618/orbeon-autocomplete-display-json-response

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet