Form submissions
A form submission is one set of answers to a form. The answers are in values, keyed by each field’s name.
Get one
Section titled “Get one”query Submission($id: uuid!) { form_submissions_by_pk(id: $id) { id created_at full_name email phone values utm_data form { name } }}{ "values": { "first_name": "Sam", "email": "sam@example.com", "message": "Is the iX1 still available?", "preferred_contact": "phone" }}Submissions for one showroom’s forms, newest first:
query Submissions($showroomId: uuid!) { form_submissions( where: { form: { showroom_id: { _eq: $showroomId } } } order_by: [{ created_at: desc }, { id: asc }] limit: 50 ) { id created_at full_name email form { name } values }}For one form, filter form_id: { _eq: "…" }. To find submissions where an answer has a value, filter values: values: { _contains: { preferred_contact: "phone" } }.
Fields worth knowing
Section titled “Fields worth knowing”| Field | Notes |
|---|---|
values |
All answers, as JSON keyed by field name. |
full_name, email, phone |
Contact details, when the form asked for them. |
user_id |
The customer, when they were signed in or an account was created. |
utm_data |
UTM parameters on the visit. |