How to prefill my survey using previous response?

When doing surveys on location one often uses questions asking for the interviewer name or the current location. Usually you have to enter these details manually for every new data set every time. Not a lot of fun…
With OfflineSurveys you can save time by pre-filling these details from the previous response. The pre-filling feature is available since version 1.25 and currently supports all Limesurvey question types besides:

  • Date
  • Sliders
  • File upload
  • Array checkboxes

Adding the feature to your survey for using it at the OfflineSurveys app is simple, it just takes 2 steps:

  1. LimeSurvey: Make sure your question has class “prefill” added. At newer LimeSurvey versions there is a setting at the Display section to add your own CSS class:

    For LimeSurvey versions older than v2.50 add this code to the question or question help text using the source code mode of the LimeSurvey editor (don’t forget to enclose  JS code in script tag as in picture below):

    $(document).ready(function() { var questionObj = $(“#question” + {QID}); questionObj.addClass(“prefill”); })

    Example:
    add-class-prefill

  2. OfflineSurveys: Activite the “Auto fill survey” feature under Manage Survey > Preferences of your survey:
    activate-auto-fill-survey