# Contact form and inquiries

This installable module runs in the website's Node.js backend and stores inquiry receipts in SQLite. It depends on `customer-crm` and `base`.

```html
<div data-runalio-contact></div>
<script src="/assets/contact-form.js" defer></script>
```

## What the customer needs to do

Install with the verified catalog installer, add the widget, review the draft, then Publish. The widget works on nested pages and custom domains. It requires name, email, message and explicit consent; phone is optional. A honeypot and a limit of ten submissions per visitor per hour reduce spam. Saving an inquiry does not claim that email was delivered.

Settings → Website modules → Contact form opens the authenticated Business admin inquiry history. Only authorized team members can read receipts or export them. Contact details also populate CRM activity. Notification email is optional: install `email-sending`, configure a provider and set `OWNER_EMAIL`. Preview saves receipts but never sends email.

Runalio periodically mirrors receipts into portal Leads, where the owner manages follow-up status. Repeated synchronization preserves that status and never duplicates a lead. Portal Leads currently holds up to 200 entries per website; the Node.js inquiry history remains available beyond that limit and is paginated. Exports include the latest 10,000 receipts. Do not represent an inquiry as a confirmed appointment or purchase.

Existing static websites can keep their built-in same-origin HTML `POST inquiry` form without installing this package. Installing the package does not automatically rewrite those forms. New Node.js forms use the widget above or JSON `POST /api/contact` with `name`, `email`, optional `phone`, `message`, `consent: "yes"` and an empty `website` field. Never expose the private `/api/admin/business/inquiries` endpoint in public pages.
