Vue.js Customer Satisfaction Survey Form Generator

Measure customer satisfaction and collect feedback

Back to Generator

Form Preview

Vue.js Code

<template>
  <div class="form-container">
    <form @submit.prevent="handleSubmit">
      <div class="form-group">
        <label for="name">Your Name</label>
        <input
          type="text"
          id="name"
          v-model="formData.name"
          
        />
      </div>
      <div class="form-group">
        <label for="email">Email Address</label>
        <input
          type="email"
          id="email"
          v-model="formData.email"
          
        />
      </div>
      <div class="form-group">
        <label for="satisfaction" class="required">How satisfied are you with our service?</label>
        <div class="radio-group">
          <div class="radio-item">
            <input
              type="radio"
              id="satisfaction-0"
              v-model="formData.satisfaction"
              value="Very Satisfied"
              required
            />
            <label for="satisfaction-0">Very Satisfied</label>
          </div>
          <div class="radio-item">
            <input
              type="radio"
              id="satisfaction-1"
              v-model="formData.satisfaction"
              value="Satisfied"
              
            />
            <label for="satisfaction-1">Satisfied</label>
          </div>
          <div class="radio-item">
            <input
              type="radio"
              id="satisfaction-2"
              v-model="formData.satisfaction"
              value="Neutral"
              
            />
            <label for="satisfaction-2">Neutral</label>
          </div>
          <div class="radio-item">
            <input
              type="radio"
              id="satisfaction-3"
              v-model="formData.satisfaction"
              value="Dissatisfied"
              
            />
            <label for="satisfaction-3">Dissatisfied</label>
          </div>
          <div class="radio-item">
            <input
              type="radio"
              id="satisfaction-4"
              v-model="formData.satisfaction"
              value="Very Dissatisfied"
              
            />
            <label for="satisfaction-4">Very Dissatisfied</label>
          </div>
        </div>
      </div>
      <div class="form-group">
        <label for="recommendation" class="required">How likely are you to recommend us to others?</label>
        <div class="radio-group">
          <div class="radio-item">
            <input
              type="radio"
              id="recommendation-0"
              v-model="formData.recommendation"
              value="Very Likely"
              required
            />
            <label for="recommendation-0">Very Likely</label>
          </div>
          <div class="radio-item">
            <input
              type="radio"
              id="recommendation-1"
              v-model="formData.recommendation"
              value="Likely"
              
            />
            <label for="recommendation-1">Likely</label>
          </div>
          <div class="radio-item">
            <input
              type="radio"
              id="recommendation-2"
              v-model="formData.recommendation"
              value="Neutral"
              
            />
            <label for="recommendation-2">Neutral</label>
          </div>
          <div class="radio-item">
            <input
              type="radio"
              id="recommendation-3"
              v-model="formData.recommendation"
              value="Unlikely"
              
            />
            <label for="recommendation-3">Unlikely</label>
          </div>
          <div class="radio-item">
            <input
              type="radio"
              id="recommendation-4"
              v-model="formData.recommendation"
              value="Very Unlikely"
              
            />
            <label for="recommendation-4">Very Unlikely</label>
          </div>
        </div>
      </div>
      <div class="form-group">
        <label for="feedback">What could we do to improve?</label>
        <textarea
          id="feedback"
          v-model="formData.feedback"
          
        ></textarea>
      </div>
      <div class="form-group">
        <button type="submit">Submit</button>
      </div>
    </form>
  </div>
</template>

<script>
export default {
  name: 'CustomerSatisfactionSurvey',
  data() {
    return {
      formData: {
        name: '',
        email: '',
        satisfaction: '',
        recommendation: '',
        feedback: '',
      }
    };
  },
  methods: {
    handleSubmit() {
      console.log('Form submitted with data:', this.formData);
      // You would typically send this data to an API here
      alert('Form submitted successfully!');
    }
  }
};
</script>

<style scoped>
.form-container {
  max-width: 600px;
  margin: 0 auto;
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.required:after {
  content: " *";
  color: red;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 16px;
}

textarea {
  height: 100px;
}

.checkbox-group, .radio-group {
  margin-bottom: 10px;
}

.checkbox-item, .radio-item {
  margin-bottom: 5px;
}

button {
  background-color: #4CAF50;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

button:hover {
  background-color: #45a049;
}
</style>

Installation

How to setup Vue.js Customer Satisfaction Survey form

  1. 1

    Sign up to parrotforms.com

    Create your first form API endpoint then copy your endpoint.

    Screenshot Placeholder
  2. 2

    Copy the example code

    Use the copy button above to copy the entire code snippet.

    Screenshot Placeholder
  3. 3

    Paste the code and update the endpoint

    Replace the form API endpoint with the one you got in step 1.

    Screenshot Placeholder
  4. 4

    Collect submissions

    View and manage all form submissions in your parrotForms dashboard.

    Screenshot Placeholder

Need more advanced forms?

Create a free parrotForms account to access more templates, save your forms, and collect submissions.

Create a Free Account