Contact Form
The form the assistant opens when a visitor should leave their details. Set aiChatSettings.contactForm to change its copy, or pass fields to describe the whole form: text, select and choice fields, section headings and notes, in your order. Here it opens on its own, prefilled as if the assistant had asked for it, and shows the message it would send.
contactForm: {
title: "Request a quote",
subtitle: "Tell us your car and the wheel you have in mind.",
buttonLabel: "Request a quote",
submitLabel: "Send enquiry",
fields: [
{ type: "heading", label: "01 Your details" },
{ type: "text", key: "name", label: "Full name", required: true, width: "half" },
{ type: "email", key: "email", label: "Email", required: true, width: "half" },
{ type: "tel", key: "phone", label: "Phone", width: "half" },
{ type: "text", key: "location", label: "Location", placeholder: "City, country", width: "half" },
{ type: "heading", label: "02 Your vehicle" },
{ type: "text", key: "make", label: "Make", required: true, width: "half" },
{ type: "text", key: "model", label: "Model", required: true, width: "half" },
// ...
{ type: "heading", label: "03 Your wheel" },
{
type: "select", key: "design", label: "Wheel design",
options: [
{ value: "", label: "Undecided — recommend for me" },
{ group: "Aero Lip Series", options: ["FW-A102", "FW-A1024"] },
{ group: "E Series EV", options: ["FW-E01", "FW-E06"] },
],
// e.g. the design on the page the visitor is reading
defaultValue: () => location.pathname.match(/\/wheels\/([^/]+)/)?.[1],
},
{ type: "choice", key: "fitment", label: "Fitment", options: ["Square", "Staggered"], defaultValue: "Square" },
{ type: "heading", label: "04 Anything else" },
{ type: "textarea", key: "message", label: "Message", prefillFromRequest: true },
],
}