If you'd like to change the title that appears on your standalone survey page after the survey has been submitted, this can be achieved with a little snippet of javascript.
Although this can't be achieved within the settings of the Grapevine Surveys app, there is a very quick and efficient way to achieve the same result by latching on to a javascript event that is fired once a survey has been submitted.
Quick Links
How do I implement this?
By adding the following snippet of javascript to the bottom of your theme.liquid template (or a more suitable location if you have one) you will achieve the desired result:
<script>
document.addEventListener("grapevine:standalone-survey-submitted", function(event) {
document.getElementById("grapevine-title").innerHTML = 'Thank you for your feedback'; });
</script>
Amend the 'Thank you for your feedback' text accordingly.
Place the code at the bottom of your theme.lquid file before the closing </body> tag and then save the file:
What if I have multiple standalone surveys?
If you're using a number of standalone surveys to collect feedback at different stages of the customer journey, then you may not want to change the title of the page to the same thing for each survey upon a successful submission.
To target a specific standalone survey, you will first need to locate its unique survey code (How do I find my unique survey code?)
Once you have the unique survey code, use the javascript below instead of the javascript provided above:
document.addEventListener("grapevine:standalone-survey-submitted", function(event) {
if (event.detail.survey_code === '1a2c3tde456') {
document.getElementById("grapevine-title").innerHTML = 'Thanks for taking our survey';
}
});
Replace the example survey code 1a2c3tde456 with your own unique survey code and remember to change the title text accordingly.
How do I test this?
The best way to test this is to do a live test of your survey.
Visit or refresh your standalone survey page and you'll see the current title (before the survey has been submitted):
Submit the survey and you will see that the survey title has been updated:
That's it!