At times you may want to use contact forms on individual pages. For instance, adding a form to a product page is a great way of encouraging customers to inquire about the product. 

In MyCashflow, contact forms are created with Interface tags that are also used for implementing themes. Interface tags are MyCashflow's internal commands used for printing online store contents and user interface components (such as forms). The tags' output can be specified by using attributes that adjust the contents printed by the tags in different ways.

Forms are printed by using the {ContactForm} tag. This tag prints a form that contains the following elements:

  • Name field
  • Email field
  • Phone number field
  • Text field for the customer's message

When the form is submitted, its contents are sent via email to the address specified in the tag's email attribute. For more information, see the instructions below.

An example of adding a contact form

If you'd like to add a contact form only to individual pages, you can use the tag in the pages' content fields. This example illustrates how to add a contact form to a product description:

  1. Open the desired product for editing in the admin panel.
  2. In the product description field, switch to the HTML edit view by clicking the <> button in the editor.
  3. Write the Interface markup with the {ContactForm} tag for printing the form.

    Below you can see a working example of markup that adds the form:

    {ContactForm(
        email: 'peter@petersonlinestore.com',
        subject: 'Inquiry about the product {ProductName}',
        success: 'Thank you for contacting us! We will answer as soon as possible.',
        failed: 'Sending the message failed'
    )}

    First, the email attribute is used for defining the email address to which the contents collected via the form should be sent. After that, the subject of the message sent by the form is defined in the subject attribute. Notice the {ProductName} tag used in the attribute that adds the product's name to the subject of the message.

    At the end, in the success and failed attributes, you can define the texts displayed to the customer after the answers entered in the form have been saved.

  4. The Interface markup should be entered in the content field's HTML edit view.
  5. Save the page, and make sure that the form is displayed and works properly in the customer area.

    Send a test message to the indicated email via the form.