Skip to content
Open Cloud
All templates

Feedback 1 step · 4 fields

NPS survey

The standard 0 to 10 recommend question with a follow-up that changes with the score.

Get a hosted link and a responses inbox in a minute. No backend, no credit card.

Or set it up yourself

Open in playground

Live preview

Form definition JSON · 42 lines
{  "id": "nps-survey",  "formatVersion": "1.3",  "title": "Quick question",  "submit": { "label": "Send feedback" },  "fields": [    {      "key": "score",      "type": "scale",      "label": "How likely are you to recommend us to a friend or colleague?",      "validation": { "required": true, "min": 0, "max": 10 },      "options": [        { "value": "0", "label": "Not at all likely" },        { "value": "10", "label": "Extremely likely" }      ]    },    {      "key": "fix",      "type": "textarea",      "label": "What’s the main thing we should improve?",      "rows": 3,      "show": [{ "field": "score", "lte": 6 }]    },    {      "key": "missing",      "type": "textarea",      "label": "What would make it a 10?",      "rows": 3,      "show": [        { "field": "score", "gte": 7 },        { "field": "score", "lte": 8 }      ]    },    {      "key": "love",      "type": "textarea",      "label": "What do you value most?",      "rows": 3,      "show": [{ "field": "score", "gte": 9 }]    }  ]}

Use it with the npm packages ​

Copy the JSON into a file in your app, install the renderer and pass the definition to it. The same JSON works with @formhaus/vue.

sh
npm i @formhaus/core @formhaus/react
tsx
import { FormRenderer } from '@formhaus/react';
import '@formhaus/core/style.css';
import definition from './form.json';

export function Form() {
  return (
    <FormRenderer
      definition={definition}
      onSubmit={(values) => console.log(values)}
    />
  );
}

See Getting started for validation, steps and custom components.