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

Actions overview

ActionDescription
InquirySendSubmits an inquiry form with the specified parameters.
InquiryCheckChecks 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
ParameterDescription
emailThe sender’s email address.
formIdThe ID of the form to be submitted.
Errors
Error codeDescription
missingEmailNo email address was specified.
emailCheckFailedThe specified email address is invalid or could not be verified.
emptyFormThe form contains no entries.
missingFormIdNo form ID was passed.
invalidFormIdThe specified form ID is not valid.
formCheckFailedThe form check failed.
createInquiryFailedThe inquiry could not be created.
Related modules, variables & methods Example that creates the action, binds it to the form via a hidden input, and checks for success or error after submission.
{{ 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
NameDescription
emailThe sender’s email address.
formIdThe ID of the form to be checked.
Error codes
Error codeDescription
missingEmailNo email address was specified.
emailCheckFailedThe specified email address is invalid.
missingFormIdNo form ID was passed.
invalidFormIdThe specified form ID is not valid.
formCheckFailedThe form check failed.
Related modules, variables & methods Example to follow.