> ## Documentation Index
> Fetch the complete documentation index at: https://dokumentation.websale.de/llms.txt
> Use this file to discover all available pages before exploring further.

# actions - Forms

> Shop actions for submitting forms: configuration of error texts and email templates for contact, inquiry and service forms in the shop.

export const TextbausteinHinweis = () => <>
    Dieser Text wird über einen Textbaustein realisiert.<br />
    Alles zu Textbausteinen in Konfigurationen finden Sie{" "}
    <a href="https://dokumentation.websale.de/konfiguration#verwendung-von-textbausteinen-in-konfigurationen">hier</a>.
  </>;

This page contains all actions relating to the submission of forms. The associated messages and email templates output when sending forms through the shop — for example contact, inquiry or service forms — are documented here.

## `actions.inquirySend` - Submit form

The `inquirySend` action controls the error messages when submitting a contact or inquiry form.

#### Example configuration `actions.inquirySend`

```json theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{
  "errorCodes": {
    "captchaFailed": "<Textbaustein>",
    "missingEmail": "<Textbaustein>",
    "emailCheckFailed": "<Textbaustein>",
    "emptyForm": "<Textbaustein>",
    "missingFormId": "<Textbaustein>",
    "invalidFormId": "<Textbaustein>",
    "createInquiryFailed": "<Textbaustein>"
  }
}
```

#### Parameter overview

| **Parameter**         | **Type** | **Description**                                                                                                            |
| --------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------- |
| `errorCodes`          | object   | Configures the error codes used for problems during the action.                                                            |
| `captchaFailed`       | string   | Error message output when the captcha check fails. <br /><br /><TextbausteinHinweis />                                     |
| `missingEmail`        | string   | Error message output when no email address was supplied although it is required. <br /><br /><TextbausteinHinweis />       |
| `emailCheckFailed`    | string   | Error message output when the supplied email address is detected as invalid. <br /><br /><TextbausteinHinweis />           |
| `emptyForm`           | string   | Error message output when the submitted form is empty. <br /><br /><TextbausteinHinweis />                                 |
| `missingFormId`       | string   | Error message output when no form ID was supplied. <br /><br /><TextbausteinHinweis />                                     |
| `invalidFormId`       | string   | Error message output when the supplied form ID is invalid or the form cannot be found. <br /><br /><TextbausteinHinweis /> |
| `createInquiryFailed` | string   | Error message output when the inquiry could technically not be saved or forwarded. <br /><br /><TextbausteinHinweis />     |

## `actions.inquiryCheck` - Check form

The `inquiryCheck` action validates the current form content without submitting the form. The rules defined in the linked `RuleSet` (see [inquiry - Forms](/en/konfiguration/inquiry-formulare)) are evaluated and the field attributes (`$field.required`, `$field.label`, `$field.defaultValue`, `$field.value`, `$field.visible`) are updated accordingly. For example, fields can be shown or hidden, marked as required, or pre-filled with a default value.

The action can be used as an autosubmit on the `<form>` element, so that a new check is triggered automatically on every input change. The form can therefore adapt dynamically to the user's input.
