Skip to content
Open Cloud
All templates

Operations 3 steps · 8 fields

Return or refund request

Order, then each item with its reason, condition and refund or exchange, plus a photo of the problem.

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 · 198 lines
{  "id": "return-request",  "formatVersion": "1.1",  "title": "Start a return",  "submit": { "label": "Send request" },  "steps": [    {      "id": "order",      "title": "Your order",      "description": "Returns are accepted within 30 days of delivery.",      "fields": [        {          "key": "orderNumber",          "type": "text",          "label": "Order number",          "placeholder": "#10482",          "helperText": "It’s in your order confirmation email.",          "validation": { "required": true }        },        {          "key": "email",          "type": "email",          "label": "Email used for the order",          "inputMode": "email",          "validation": { "required": true }        },        {          "key": "name",          "type": "text",          "label": "Full name",          "validation": { "required": true }        }      ]    },    {      "id": "items",      "title": "What you’re returning",      "fields": [        {          "key": "items",          "type": "group",          "label": "Items",          "itemLabel": "Item {index}",          "addLabel": "Add another item",          "defaultItems": 1,          "validation": { "required": true, "maxLength": 10 },          "fields": [            {              "key": "item",              "type": "text",              "label": "Item",              "placeholder": "Linen shirt, blue, M",              "validation": { "required": true }            },            {              "key": "quantity",              "type": "number",              "label": "Quantity",              "inputMode": "numeric",              "defaultValue": 1,              "validation": { "required": true, "min": 1 }            },            {              "key": "reason",              "type": "radio",              "label": "Reason for the return",              "options": [                { "value": "fit", "label": "Wrong size or doesn’t fit" },                { "value": "damaged", "label": "Arrived damaged" },                {                  "value": "defective",                  "label": "Stopped working or is faulty"                },                {                  "value": "wrong-item",                  "label": "Received the wrong item"                },                {                  "value": "not-as-described",                  "label": "Not as described"                },                { "value": "changed-mind", "label": "Changed my mind" },                { "value": "other", "label": "Other" }              ],              "validation": { "required": true }            },            {              "key": "details",              "type": "textarea",              "label": "Tell us what happened",              "rows": 3,              "show": [                {                  "field": "reason",                  "in": [                    "damaged",                    "defective",                    "not-as-described",                    "other"                  ]                }              ],              "validation": { "required": true }            },            {              "key": "damageLink",              "type": "text",              "label": "Link to photos of the damage and the packaging",              "placeholder": "https://",              "helperText": "A shared album or folder. We need them to file a claim with the carrier.",              "show": [{ "field": "reason", "eq": "damaged" }],              "validation": { "required": true }            },            {              "key": "condition",              "type": "radio",              "label": "Condition of the item",              "options": [                { "value": "unopened", "label": "Unopened, with tags" },                { "value": "unused", "label": "Opened but unused" },                { "value": "used", "label": "Used" }              ],              "validation": { "required": true }            },            {              "key": "resolution",              "type": "radio",              "label": "How should we make it right?",              "options": [                {                  "value": "refund",                  "label": "Refund to my original payment method"                },                {                  "value": "exchange",                  "label": "Exchange for another size or item"                },                { "value": "store-credit", "label": "Store credit" }              ],              "validation": { "required": true }            },            {              "key": "exchangeFor",              "type": "text",              "label": "What would you like instead?",              "placeholder": "Same item in size M",              "show": [{ "field": "resolution", "eq": "exchange" }],              "validation": { "required": true }            }          ]        },        {          "key": "photo",          "type": "file",          "label": "Photo of the damage or the item",          "accept": "image/*",          "helperText": "For a faulty or wrong item."        },        {          "key": "photosLink",          "type": "text",          "label": "Link to more photos",          "placeholder": "https://",          "helperText": "A shared album or folder."        }      ]    },    {      "id": "resolution",      "title": "Sending it back",      "fields": [        {          "key": "returnMethod",          "type": "radio",          "label": "How will you send it back?",          "options": [            {              "value": "label",              "label": "Email me a prepaid shipping label"            },            {              "value": "drop-off",              "label": "I’ll drop it off at the store"            }          ],          "validation": { "required": true }        },        {          "key": "phone",          "type": "phone",          "label": "Phone",          "inputMode": "tel",          "helperText": "Only if we need to reach you quickly."        }      ]    }  ]}

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.