Русский
Academy: all guides

Forms, buttons, and saved enquiries

How to declare a form, bind it to a page or button, run a private test with fictitious details, and find the saved enquiry. Also why a success message does not prove email, webhook, or CRM delivery.

The form and its fields

A form is a site entity, not HTML on a page. For a site built from a theme, declare it once in the theme’s forms[] and publish a release; for an ordinary site, create it under Admin → Sites → [site] → Forms → New form. The name, fields, submit label, success message, and consent live in the form definition. For a theme-managed site, forms[] and the installer package are the source of truth: an Admin-only edit does not replace a theme release.

Fields are text, email, phone, textarea, checkbox, and select. Core validates required fields, email format, an allowed select option, and a required checkbox. Only declared fields are stored; an unknown key is rejected.

Consent. If the form collects personal data, add a required checkbox and text with a link to the policy. The text has exactly one {policy} and at most one {button}. The enquiry keeps a snapshot of the accepted text and the form revision, so a later edit cannot rewrite consent retroactively.

The submit label defaults to Submit when unset. The success message is ordinary form copy; it does not depend on email or a CRM. When the form changes, the published page keeps the old version until a new release; a stale open page is rejected and asked to reload the form rather than accept data under old consent.

Captcha is optional: quiet uses passive checks only, adaptive challenges a suspicious submission, and strict always challenges. A hidden honeypot and the spam score help classify an enquiry; they do not replace human review.

Bind it to a page or button

One form can have several entry points. Add a native form block and choose the definition, so the visitor fills in the fields on the page. Or configure a button: set its behaviour to open a form dialog and choose the same form; a native dialog opens with the same fields and the same submission. This is not a copy or a third-party widget: both entry points reference one form.

In a source theme, use Form({ ref: 'form:<key>' }) for the embedded block and Link({ action: { type: 'dialog', target: 'form', form_id: 'form:<key>' } }) for the button. In shared definitions such as a header or footer, both bindings require locale; on a page the language is inherited. Without to the button only opens the dialog; with to it keeps a fallback link.

Do not paste the form as arbitrary HTML or duplicate its fields by hand: consent, revision, and storage will diverge. If the form changed recently, publish a new release and test the published page, not only the preview.

A private test with fictitious details

Use a separate test site or installation and publish a test page. Do not add it to the menu or send its link to visitors; remember that robots.txt and an unlisted URL do not make a page private when it is reachable over the network.

Enter only fictitious details: a made-up name, phone number, and an address such as example.com. Do not use a real client’s data, payment details, identity documents, health information, or passwords, even when the mail recipient is internal.

Check both languages, required fields, consent, and captcha. First submit an invalid case (empty required field, bad email, cleared consent), then a valid test enquiry. The success message should match what you actually configured and should not promise CRM delivery.

The form preview shows how the block looks; it does not replace a submission from the published test page. Do not delete the test form before preserving evidence: deleting a form also deletes its stored submissions.

Where the enquiry is recorded

A saved enquiry lives in HOBA, not in email or a CRM. Open Admin → Sites → [site] → Forms → Submissions and choose the form. The list shows the time, spam score, and a short preview of values; opening a row shows all stored fields.

Core stores the enquiry in the cms_form_submissions table with the site and form IDs, values of declared fields, form revision, consent snapshot, and spam score. Values are not rewritten by a later form edit. The spam score is a heuristic and does not delete an enquiry automatically.

This is the only place an enquiry appears by default. The Admin → Notifications page holds platform notices and site warnings, not the enquiry inbox. A separate inbox, CRM, or table needs a route below; the form itself does not send anything there.

Deleting a form also deletes its stored submissions. A published release keeps its own embedded copy and the page stays online, but submissions to the deleted form stop being accepted. Enquiries from the deleted form cannot be recovered.

Saved is not the same as delivered

After a successful submission, Core returns the created enquiry and shows the configured success message. That confirms only the HOBA record. The email and plugin form.submitted automations start after storage, off the response path, while the webhook event is queued with the enquiry; a visitor should not wait for mail or a CRM.

Email. The message goes to the addresses under Admin → Connections → Form notifications, not to the visitor. If the master switch is off or SMTP is unconfigured, the enquiry is still stored and the email is skipped silently. A delivery failure is written to the Core log and is not retried automatically.

Webhook. The form.submitted event is placed in a durable outbox in the same transaction as the enquiry and delivered as a signed POST. Delivery is at-least-once: the receiver must verify the signature and handle repeats through X-Hoba-Delivery. Failed attempts are retried with backoff; after 12 attempts a delivery becomes dead and can be redelivered from the log.

Plugin or adapter. A plugin automation on form.submitted receives the stored fields and can pass the lead to an external system. An automation failure is logged and never shown to the visitor; partial CRM records are possible. A separate adapter, for example for Bitrix24, receives the signed event and keeps its own delivery log.

The success copy should therefore say that the enquiry was saved, not that an email was sent or a lead was created. Check delivery in the specific route’s log and in the external system.

Which routes are supported

Before promising delivery, check that the route exists in this installation and is enabled:

  • Email notifications. Admin → Connections → Form notifications provides the SMTP host, port, sender, recipients, TLS, and master switch. The password is supplied only by the name of a deployment secret and is not stored in the browser or database. This route is for the operator; it does not send an automatic reply to the visitor.

  • Site webhooks. Admin → Sites → [site] → Webhooks subscribes to form.submitted with an HMAC secret. The test button queues a test delivery; after that, still send a test enquiry and find its separate delivery in the log. The worker interval is set under Admin → Connections → Runtime settings (worker.webhook_interval_secs); 0 disables processing.

  • Plugins and adapters. An automation that passes an enquiry to an external service needs an outbound HTTP grant and an exact host list; examples are amoCRM and 1C from the catalogue. Bitrix24 is a separate adapter service, not a package in the Plugins section. Check the specific package guide and its current status.

This is not a universal gateway: if the installation has no required plugin, adapter, or subscription, the enquiry stays only in HOBA. Do not use a false success message instead of configuring a route. Check the current build and catalogue, not an assumed integration from another version.

A short check

  • Publish a test page and submit a fictitious enquiry from a phone and a computer, in both languages.

  • Open Forms → Submissions: find the row and check all fields, the spam score, and the time.

  • For email, check the recipient inbox; if nothing arrives, check the master switch and SMTP first, then the Core log. Do not treat form success as proof of email.

  • For a webhook, check the signature, event, and delivery row; replay the same X-Hoba-Delivery and confirm the handler does not create a duplicate.

  • For a plugin or CRM, check the automation log and the external record; when in doubt, reconcile manually rather than resubmitting the enquiry.

  • Confirm that the success message and consent text describe actual behaviour, and that all test personal details are fictitious.