> ## 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.

# Inquiry

> Reference for WEBSALE inquiry actions used to submit contact or product inquiry forms from the frontend into the shop processing logic.

This section describes the available actions in the Inquiry area. With these actions, contact or inquiry forms can be submitted, for example.

***

## Actions overview

| **Action**     | **Description**                                        |
| -------------- | ------------------------------------------------------ |
| `InquirySend`  | Submits an inquiry form with the specified parameters. |
| `InquiryCheck` | Checks the inputs of a form without submitting it.     |

***

## Actions

### InquirySend

This action submits an inquiry form. The submitted entries are checked and the inquiry is processed. If processing fails, a corresponding error is returned so the user can correct their entries.

**Usage example**\
Useful for embedding a contact form on a page through which customers can submit an inquiry. After clicking "Submit", the form is validated and the inquiry is transmitted.

**Parameters**

| **Parameter** | **Description**                     |
| ------------- | ----------------------------------- |
| `email`       | The sender's email address.         |
| `formId`      | The ID of the form to be submitted. |

**Errors**

| **Error code**        | **Description**                                                  |
| --------------------- | ---------------------------------------------------------------- |
| `missingEmail`        | No email address was specified.                                  |
| `emailCheckFailed`    | The specified email address is invalid or could not be verified. |
| `emptyForm`           | The form contains no entries.                                    |
| `missingFormId`       | No form ID was passed.                                           |
| `invalidFormId`       | The specified form ID is not valid.                              |
| `formCheckFailed`     | The form check failed.                                           |
| `createInquiryFailed` | The inquiry could not be created.                                |

**Related modules, variables & methods**

* [\$wsForm](/en/frontend/referenz/module/wsform)
* [\$wsForm.inquiryId](/en/frontend/referenz/module/wsform#\$wsform-inquiryid)
* [\$wsForm.loadType()](/en/frontend/referenz/module/wsform#\$wsform-loadtype)
* [\$wsForm.load()](/en/frontend/referenz/module/wsform#\$wsform-load)

**Example** that creates the action, binds it to the form via a hidden input, and checks for success or error after submission.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{{ var $cMyInquirySendAction = $wsActions.create('InquirySend') }}

<form method="post" data-ws-ajax-form>
   <input type="hidden" name="wscsrf" value="{{= $cMyInquirySendAction.csrf }}">
   <input type="hidden" name="wsact"  value="{{= $cMyInquirySendAction.id }}">
   <input type="hidden" name="formId" value="productQuestion">

   {{ if $cMyInquirySendAction.success }}
      <div class="alert alert-success">%%InquirySuccessTxt%%</div>
   {{ else }}
      <input type="email" name="email" class="form-control">
      <button type="submit" class="btn btn-primary">%%InquirySendButtonTxt%%</button>
   {{ /if }}
</form>
```

***

### InquiryCheck

This action checks the inputs of a form without actually submitting the inquiry. The checked field values are written back to `$myField.value` and can be reused in the frontend.

**Usage example**\
Useful for validating form inputs before final submission and giving the user direct feedback on their entries.

**Parameters**

| **Name** | **Description**                   |
| -------- | --------------------------------- |
| `email`  | The sender's email address.       |
| `formId` | The ID of the form to be checked. |

**Error codes**

| **Error code**     | **Description**                         |
| ------------------ | --------------------------------------- |
| `missingEmail`     | No email address was specified.         |
| `emailCheckFailed` | The specified email address is invalid. |
| `missingFormId`    | No form ID was passed.                  |
| `invalidFormId`    | The specified form ID is not valid.     |
| `formCheckFailed`  | The form check failed.                  |

**Related modules, variables & methods**

* [\$wsForm](/en/frontend/referenz/module/wsform)
* [\$wsForm.loadType()](/en/frontend/referenz/module/wsform#\$wsform-loadtype)

**Example** to follow.
