Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fill choices for dropdown, radio and checkox questions from a restfull service #67

Closed
andrewtelnov opened this issue Sep 10, 2016 · 2 comments

Comments

@andrewtelnov
Copy link
Member

A new choicesByUrl attribute/object has been added into dropdown, radio and checkox questions.
It has attributes:
url : string - the restfull service web url
path: string - the path the data from returning json. For example, for this service, the path will be: "RestResponse;result".
valueName: string - the name of the value in the json array. If it is empty, the first attribute is used.
valueTitle: string - the name of the title in the json array. If it is empty, the title equals to value.
Here is the example of filling dropdown question with the country list:
{ type:"dropdown", name: "country", choicesByUrl: {url: 'http://services.groupkt.com/country/get/all', path: 'RestResponse;result', valueName: 'name'} }

@andrewtelnov
Copy link
Member Author

Could any one comment on this functionality?
I have an idea to add parameters. For example, a user select a department, and then the list of employees in the department, using restful service. It will be an ability to use the {department} parameter, bound to the 'department' question value, in url for getting employee list via a restful service.
I am not sure that I am going into the right direction. Does somebody need it?

Thank you,
Andrew

@andrewtelnov
Copy link
Member Author

FYI: It was implemented. Here is the example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant