set_form
Add or update a contact form on a site. Describe the fields the visitor should fill (a name, an email, a message, a dropdown, and so on) and this stores them and returns an HTML form to drop into the page with write_files; the form posts to the site's own address, no third-party form service. Submissions are emailed to the owner (pressing Reply answers the visitor), kept for the chat inbox (form_messages), and, on the Pro plan, posted to a webhook (a Slack or Discord webhook, a Zapier catch hook, or any https URL). Hostlo forms are not for passwords or card numbers and refuse such fields. Use the name 'contact' unless the site needs more than one form.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | A short name for the form, used in its address `/_hostlo/forms/<name>`: lowercase letters, digits and underscores, e.g. "contact" or "call_back". Default "contact". | |
| site | Yes | The site the form belongs to. | |
| fields | Yes | The fields the visitor fills, in the order they should appear. | |
| email_to | No | Where submissions are emailed. Leave out to use the account's own address (the usual choice). | |
| webhook_url | No | A webhook URL to also POST each submission to (Pro plan): a Slack or Discord incoming webhook, a Zapier catch hook, or any https endpoint. Leave out for email only. |