+ Reply to Thread
Results 1 to 3 of 3
-
07-03-2009 09:52 AM #1
Junior Member
- Join Date
- Jun 2009
- Posts
- 4
Programatically Respond to Survey
Hi,
We have a requirement that we allow for special surveys get created that will not be responded to by people, but rather will be responded through formatted import files. We are creating the parsers for the imports into .Net objects and want to inject these objects into Checkbox as answers to the surveys. We are going to validate that the data in memory matches the format expected by the survey prior to insertion.
What does the API have to support the programatic answering of surveys? Do I need to add the answers to the database directly? What are your recommendations?
Cheers,
Jeremy.
-
07-08-2009 01:41 PM #2
Administrator
- Join Date
- Mar 2007
- Location
- Prezza Technologies
- Posts
- 227
Jeremy,
Sorry it took a while to respond to this. We're a little short-staffed this week due to vacations and holidays.
It is definitely possible to respond to surveys directly through the API. My recommendation would be to create and responses just as the Checkbox UI does.
An overview of the process is the following:
1) Create a new Response object. A response is the container for the state of a survey response...including the answer ata.
2) Using the response object, you can access the survey items, which support methods for setting answers.
3) Set the answers, selected values (for select inputs), etc. for the items in the survey.
4) Tell the response to save it's state, which will cause data to be persisted to the database.
It may sound a little confusing but it's actually pretty straightforward.
The following thread covers creating a page that shows a one-page view of a survey, but most of the above concepts are illustrated in the sample solution attached to my post of 3-24-2008.
Here is the thread:
http://www.checkbox.com/community/ch...questions.html
Here is the sample project:
CHECKBOX® Online Community
-
07-08-2009 01:54 PM #3
Administrator
- Join Date
- Mar 2007
- Location
- Prezza Technologies
- Posts
- 227
Jeremy,
Also see this thread for more information:
http://www.checkbox.com/community/checkbox-developer-kit/291-create-new-survey-response-via-api-2.html


LinkBack URL
About LinkBacks
Reply With Quote
