How to change message to users when survey has expired

The system generates a standard message when a participant tries to access a survey that has expired. 

Sometimes you might want to change this message text. You can do this by following these steps:
 
  1. Go to Configuration->Template editor
  2. If you have an existing custom template, you will want to select it from the Template dropdown 
  3. If you don't have any custom templates, select the default one you are using for your survey and then click the "Copy" button.
  4. Give the copy a name when prompted
  5. On the left side of the screen, under Javascript files, select scripts/template.js
  6. Scroll to the bottom of the file in the editor window
  7. Insert a new line
  8. Paste the following text:

    $(document).ready(function() { 
        if($('p#tokenmessage').length > 0 && $('#tokenform').length == 0) {
        var stringIndex = $('p#tokenmessage').text().indexOf('We are sorry but the survey is expired and no longer available.'); 
        if(stringIndex >= 0) {
        $('p#tokenmessage').html('Sorry, this survey is currently unavailable -- it may have expired or has not yet been published.');
      }
    } 
    });
  9. You can update the text "Sorry, this... published." with whatever text you want to show -- be sure to keep the single quotes around the text as shown above.
  10. Click Save Changes at the bottom of the edit window
  11. Lastly, you need to assign the template to your survey.
  12. Return to your survey and select "Survey properties->General Settings" and under the right panel "General options" select your custom template from the Template dropdown

 


We greatly appreciate your feedback.




Powered by LiveZilla Live Chat Software