Checkbox Forums

Help
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    noneerror is offline Junior Member
    Join Date
    Jun 2009
    Posts
    4

    Default 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.

  2. #2
    ncushing is offline Administrator
    Join Date
    Mar 2007
    Location
    Prezza Technologies
    Posts
    227

    Default

    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

  3. #3
    ncushing is offline Administrator
    Join Date
    Mar 2007
    Location
    Prezza Technologies
    Posts
    227

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

SEO by vBSEO 3.5.0