Prints the contact form that sends contact request notifications to the selected email address.

Description

The form contains the following fields:

  • Name (required)
  • Email (required)
  • Phone number
  • Content field (required)

The tag is often used to add the form to a product page, so that customers can request more information about the product.

You can also activate the Email Marketing extension in your online store to add the ReCaptcha check to the contact form in order to prevent bots from sending spam messages by using the form.

You can also enable reCAPTCHA in your online store by contacting our customer service.

Syntax

{ContactForm(
    email: string,
    failed: string,
    subject: string,
    success: string,
    on_success: string
)}

Scope

Required scope: globaali

Tags with global scope can be used on any template and in any tag.

Attribuutit

email:

The email address to which the message is sent (e.g. soittopyynto@firma.fi). By default, the form uses the email address specified either on the Settings > General settings page or in the settings for the selected store version.

Allowed values: Valid email address.

failed:

The message that is displayed after the form couldn't be sent.

Allowed values: Text as well as HTML and Interface markup

subject:

The subject of the message sent to the admin.

Allowed values: Text

success:

The message that is displayed after the form has been sent successfully.

Allowed values: Text as well as HTML and Interface markup

on_success:

Specifies the address to which the customer is directed after the contact form has been submitted.

This attribute is especially useful if you want Google Analytics to track contact request conversions.

Allowed values: URL address

E.g. on_success:'/page/12'

after/before:

By using the after and before attributes you can define content that is output either after or before the tag's output.

Allowed values:The HTML and Interface markup

E.g.

  • before: '<p>Tämä merkkaus näkyy ennen tagin omaa sisältöä.</p>'
  • after: '<p>Tämä taas näkyy tagin oman sisällön jälkeen.</p>'

If the tag does not produce any content, neither the content of the after and before attributes will be output.

escape:

Adds an escape character before quotation marks in the output.

The attribute makes it easier to process the tag-produced content when using JavaScript.

Allowed values:true/false. The default value is false.

or:

Defines alternative content that is displayed if the tag itself does not produce any content.

Allowed values:The HTML and Interface markup

E.g. or:'Sisältöä ei löytynyt.'