EN IT
Open2b version 7.8

Contact

Below are the variables documented for the contact-us.html contact page.

In addition to these, you can also use the variables common to all pages.

contact-us.html

Allows sending a contact request from the store.

var (

    // Button to send the contact request.
    buttonSend html

    // Page content.
    content html

    // Page image.
    image AlignedImage

    // Confirmation or error message when sending the request.
    statusMessage string

)

The contact form

In the base template page there are some fields that you can freely modify, and you can add new ones. The hidden require field lists, separated by commas, the names of the required fields.

For example, if the page contains the following form:

<form action="contact-us.html" method="post">
  <input type="hidden" name="require" value="Name,Phone,Email,Message">
  <label>Name: <input type="text" name="Name" maxlength="100"></label>
  <label>Phone: <input type="text" name="Phone" maxlength="100"></label>
  <label>Email: <input type="text" name="Email" maxlength="100"></label>
  <label>Message: <textarea name="Message"></textarea></label>
  {{ captcha }}
  {{ buttonSend }}
</form>

The customer will fill in the various fields; only those listed in the hidden "required" field are mandatory. The received email will contain all the form fields.

If you want to add a consent request, you can add a specific field to the form and make it mandatory:

  <input type="hidden" name="require" value="Name,Phone,Email,Message,Consent">
  ...
  <label><input type="checkbox" name="Consent" value="Yes"> I consent to the processing of this personal data</label>