Dynamic questionnaire according to methodology

Compatibility:IdSurvey 5IdSurvey 6

To display texts, questions or pages according to the methodology used you have to save a variable in the contact (if you use mixed mode and the interview is completed with a different methodology than the one saved by the javascript, this variable will stay the same). This data can then be used in a normal filter to create a dynamic questionnaire according to methodology.

INSTRUCTIONS

Create the page of your questionnaire with a single select questions with two answer options:

  1. Answer option one will be for interview started with CAWI
  2. Answer option two will be for interview started with CATI
  3. Answer option three will be for interview started with CAPI

For each of the answer options go on the gearwheel button and enable “Edit contact field” (or on older versions “Update quota”) and select on the dropdown the field you’ll use to save the information (in the example Field14 was used).
Then for Answer1 write on the box below “CAWI”, for Answer2 write “CATI” and for Answer3 write “CAPI”.

Now go on the gearwheel button of the page and enable button “Client script”. Copy on the box the following code:

<style>
      #page{
          display:none;
      }
  </style>
  <script type="text/javascript">
      var host = self.location.href;
      if(host.indexOf(".cawi.") > 0){
          $(".single-question-responses li:first-child input[type=radio]").trigger("click");
       }else if(host.indexOf(".cati.") > 0){
          $(".single-question-responses li:nth-child(2) input[type=radio]").trigger("click");
       }else{
          $(".single-question-responses li:last-child input[type=radio]").trigger("click");
       }
      $("#nextPage").trigger("click");
  </script>

module_script

Your page IdCode will look like this::

/page Pstart1
  <clientscript>
  <style>
      #page{
          display:none;
      }
  </style>
  <script type="text/javascript">
      var host = self.location.href;
      if(host.indexOf(".cawi.") > 0){
          $(".single-question-responses li:first-child input[type=radio]").trigger("click");
       }else if(host.indexOf(".cati.") > 0){
          $(".single-question-responses li:nth-child(2) input[type=radio]").trigger("click");
       }else{
          $(".single-question-responses li:last-child input[type=radio]").trigger("click");
       }
      $("#nextPage").trigger("click");
  </script> </clientscript> start1   Marks if interview has started on CAWI or CATI 1 If CAWI marks CAWI on Field14 /UQ "Field14=CAWI" 2 If CATI marks CATI on Field14 /UQ "Field14=CATI" 3 If CAPI marks CAPI on Field14 /UQ "Campo14=CAPI" 

Now you can use the variable saved in the contact field to create branching and logic according to the methodology used, achieving a dynamic questionnaire according to methodology.

Leave A Comment?