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:
- Go to Configuration->Template editor
- If you have an existing custom template, you will want to select it from the Template dropdown
- If you don't have any custom templates, select the default one you are using for your survey and then click the "Copy" button.
- Give the copy a name when prompted
- On the left side of the screen, under Javascript files, select scripts/template.js
- Scroll to the bottom of the file in the editor window
- Insert a new line
- 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.');
}
}
});
- 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.
- Click Save Changes at the bottom of the edit window
- Lastly, you need to assign the template to your survey.
- 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
204 of 495 people found this helpful.