Enquiries
Create enquiries using HTML forms or JavaScript, with enquiry and customer parameters.
Enquiries
Create enquiries using HTML forms or JavaScript, with enquiry and customer parameters. First, complete the installation.
Create Enquiries
Use data-tiquo-form="enquiry" for a hosted website form. A signed-in visitor's
enquiry is attached to their own customer profile. Anonymous submissions use
the configured public key and allowed domain, and find or create a customer by
email. Submitting an enquiry does not sign the visitor in.
<form data-tiquo-form="enquiry">
<input type="email" data-tiquo-enquiry-customer="email" required />
<input type="hidden" data-tiquo-enquiry="type" value="YOUR_ENQUIRY_TYPE_ID" />
<input type="hidden" data-tiquo-enquiry="subject" value="Waitlist" />
<label>
Preferred event
<input data-tiquo-enquiry-parameter="ENQUIRY_TEXT_PARAMETER_ID" />
</label>
<label>
Need wheelchair access for this event
<input type="checkbox" data-tiquo-enquiry-parameter="ENQUIRY_BOOLEAN_PARAMETER_ID" />
</label>
<p data-tiquo-message></p>
<button type="submit">Send enquiry</button>
</form>Replace placeholders with the type ID and its enquiry parameter schema IDs. Configure enquiry parameters under Settings > Enquiries. A field's ID must belong to the selected type and organisation. This attribute does not refer to customer parameters and cannot change customer preferences.
| Attribute | Purpose |
|---|---|
data-tiquo-form="enquiry" | Bind enquiry submission |
data-tiquo-enquiry-customer | email (required), firstName, lastName, phone, or phoneCountry |
data-tiquo-enquiry | type, subject, message, category, priority, or source |
data-tiquo-enquiry-parameter | Enquiry parameter schema ID |
data-tiquo-enquiry-customer-parameter | Customer parameter schema ID; fills missing customer-editable profile values only |
data-tiquo-message | Submission feedback |
Supply at least subject or message. A single parameter checkbox sends a
boolean, a checkbox group sharing the same ID sends an array, and a multiple
select sends an array. Use a multiple select for a one-option multiselect.
Disabled fields are omitted. Forms emit tiquo:enquiry-created or
tiquo:enquiry-error, with the result/error in event.detail.
JavaScript Submission
await window.Tiquo.createEnquiry({
customer: { email: 'guest@example.com' },
enquiry: {
type: 'YOUR_ENQUIRY_TYPE_ID',
subject: 'Waitlist',
enquiryParameterValues: [
{ enquiryParameterId: 'ENQUIRY_TEXT_PARAMETER_ID', value: 'Evening event' },
{ enquiryParameterId: 'ENQUIRY_BOOLEAN_PARAMETER_ID', value: false },
],
},
});The HTML binding builds this same payload. Names and contact fields only fill missing customer data. Customer parameter IDs cannot be used as enquiry parameter IDs. The enquiry answer request names remain enquiryParameterValues and enquiryParameterId.
Customer parameters can be initialized through customer.customerParameterValues only when no stored value exists and the parameter is customer editable. Existing rows are never overwritten, even when the stored value is empty, false, or a system default. This applies to guests and authenticated enquiry submissions. customer.details remains supported as a legacy object keyed by customer parameter ID, name, or normalized key. Explicit array entries are processed first; the first non-empty value for a missing schema wins. Null, empty text, and empty arrays are ignored. Invalid or non-editable parameters reject the whole submission.
Marketing/SMS Opt-In defaults count as existing values, so this route cannot change their seeded false values. Use an authenticated profile form or the server-side Admin API to change existing preferences. Customer parameter values are saved on the profile, not included in the enquiry.created event payload.
await window.Tiquo.createEnquiry({
customer: {
email: 'guest@example.com',
customerParameterValues: [
{ customerParameterId: 'YOUR_CUSTOMER_PARAMETER_ID', value: 'Example Ltd' },
],
// Legacy alternative: details: { YOUR_CUSTOMER_PARAMETER_ID: 'Example Ltd' }
},
enquiry: { type: 'YOUR_ENQUIRY_TYPE_ID', subject: 'Waitlist' },
});Use a customer parameter schema ID for customerParameterId, not an enquiry parameter ID. Values accept strings, finite numbers, booleans, null, or string arrays (for multiselects). At most 100 entries across both fields and 10,000 serialized characters per value are accepted. Enquiry answers remain separate under enquiry.enquiryParameterValues with enquiryParameterId.
For a hosted HTML enquiry form, add a customer parameter input:
<input data-tiquo-enquiry-customer-parameter="YOUR_CUSTOMER_PARAMETER_ID" />This produces customer.customerParameterValues. Single checkboxes send booleans, checkbox groups send arrays, and disabled fields are omitted.
Enquiry parameter values are validated and stored only on the new enquiry. Invalid schema IDs or
options reject the whole submission. The event carries normalized strings under
enquiryParameters.<enquiryParameterId>. See Enquiry Parameters
for value types, limits, and event behaviour.