google form confirmation message based on response

Google Form Confirmation Message Based on Response

By Andrew Allen
AD

When it comes to Google Forms, customizing the confirmation message can significantly enhance user experience. This message appears after a user submits their responses, providing an opportunity to engage, thank, or even direct the user to the next step. By default, Google Forms displays a basic confirmation message, but with a bit of scripting, you can create a dynamic message that reacts to the user's responses. Let's explore how to create a Google Form confirmation message based on the response.

First, you need to understand that creating a custom confirmation message involves using Google Apps Script to manipulate the form's behavioral properties. This script allows you to perform actions when specific events occur, such as form submission. Now, let's dive into the details of crafting a response-based confirmation message.

Understanding Google Apps Script for Form Confirmation Message

Google Apps Script is a JavaScript-based scripting language that allows you to automate tasks across Google products. For our purpose, we'll use it to modify the form's confirmation message based on the user's response. To get started, you need to have a basic understanding of JavaScript and JavaScript Object Notation (JSON).

AD
GOOGLE FORM!!
GOOGLE FORM!!
How to Add Response Validation to Google Forms
How to Add Response Validation to Google Forms
Google Forms: Link to Next Activity - Teacher Tech with Alice Keeler
Google Forms: Link to Next Activity - Teacher Tech with Alice Keeler

In the context of Google Forms, the script can access the form's fields and responses, enabling you to create conditional confirmations. For instance, you can create a message that acknowledges the user's effort or provides specific instructions based on their inputs.

Creating a Simple Response-Based Confirmation Message

To create a simple confirmation message that changes based on the user's response, you can use the following script:

google form YOU CAN READ OTHER RESPONSES AT THE END
google form YOU CAN READ OTHER RESPONSES AT THE END
How to Limit Responses in Google Forms
How to Limit Responses in Google Forms
How to Add Response Validation to Google Forms
How to Add Response Validation to Google Forms
function onFormSubmit(e) {
  var response = e.values;
  var message;

  if (response[1] === "Yes") {
    message = "Thank you for your positive response!";
  } else {
    message = "We appreciate your honest feedback.";
  }

  e.copy = message;
}

In this example, the script checks the second response (index 1 as the first element is 0-based) and sets the confirmation message accordingly. You can adjust the index to fit your form's structure.

To implement this script, follow these steps:

AD
  1. Open your Google Form.
  2. Click on "Extensions" in the top menu and then click "+ Add-on" at the bottom right.
  3. Search for "Apps Script" and click "+ FREE" to install it.
  4. A new Apps Script tab will open. Delete any existing code in the "Code.gs" file and paste the above script.
  5. Save the project with a relevant name.
  6. Back in your form, click on "_settings" and then "Confirmations".
  7. Under "Enable confirmations for," select "Form submissions."
  8. In the "Confirmation message" box, type ":copy".
  9. Test your form to see the custom message in action.

Creating a More Complex Response-Based Confirmation Message

You can create more intricate confirmation messages by manipulating the form's responses using arrays, loops, and conditional statements. This allows you to display different messages based on multiple responses or even use dynamic content like form responses in your message.

3 Ways to Check Answers in Google Forms
3 Ways to Check Answers in Google Forms
Google Form Not Accepting Responses – How to Fix?
Google Form Not Accepting Responses – How to Fix?
This Question Requires One Response per Row
This Question Requires One Response per Row
google form with new questions!
google form with new questions!
How to add response validation to a question in Google Forms?
How to add response validation to a question in Google Forms?
It took me probably an hour or two to make this so please consider sparing 5-10 minutes of your time
It took me probably an hour or two to make this so please consider sparing 5-10 minutes of your time

For instance, you can display a personalized message that thanks the user and mentions their name, like this:

function onFormSubmit(e) {
  var response = e.values;
  var message = "Thank you for your submission, " + response[0] + "!";

  e.copy = message;
}

In this example, the confirmation message pulls the user's name from the first response and incorporates it into the message dynamically. This can significantly enhance user engagement and satisfaction.

AD

Best Practices for Creating Response-Based Confirmation Messages

While customizing the confirmation message based on the user's response can enhance the user experience, it's essential to follow best practices to ensure this personalization is beneficial and not detrimental:

How can I redirect the respondent to different pages based on form response?
How can I redirect the respondent to different pages based on form response?

Keep it Relevant

Tailor your confirmation message to the user's responses to make it feel personalized and relevant. This can range from acknowledging specific answers to offering follow-up resources based on their input.

For example, if a user responds to a question about their favorite book, you can provide a recommendation in the confirmation message based on their choice. This not only shows that you've read their responses but also adds value to the user's experience.

AD

Use Clear and Concise Language

Ensure your confirmation message is easy to understand and conveys your intended meaning accurately. Avoid jargon and overly complex sentences that may confuse or frustrate users.

Remember that the confirmation message should be brief and to the point. It's not the place for long-winded diatribes or excessive information. Instead, focus on key points and use dynamic content like responses or follow-up actions to provide more detailed information if necessary.

Test Thoroughly

Before rolling out your response-based confirmation message, test it thoroughly to ensure it functions as intended across different scenarios. This includes edge cases, unexpected inputs, and actual user testing to get a feel for how users might interact with it.

Fix any bugs or inconsistencies in your script and messages to provide a seamless user experience. This also includes testing on different devices and browsers to ensure compatibility.

In the dynamic world of Google Forms, creating a confirmation message that adapts to the user's responses can significantly improve user experience and engagement. By leveraging Google Apps Script, you can personalize this message, provide valuable follow-up information, and even guide the user towards the next step in their journey. With a bit of creativity and careful planning, you can turn a simple confirmation message into a powerful tool for enhancing form interactions. So, go ahead and customize – the possibilities are as vast as the responses your users provide!

AD