Miva Merchant, eCommerce, SEO, Wordpress, & general web development and consultation.

MvContact Form Mailer / MvContact Form Mailer Overview

MvContact Form Mailer Overview

If you got this far you know how to install a module and activate it. The only thing left is go to the items tab and activate the MvCONTACT item. Be sure this is the page you are going to use for your contact page. You don't need to activate the item for any other page in your store unless you want to have another contact form of some kind.

Reserved Fields

  • MvCONTACT_email: use this for the email address field. The module will check to make sure the email address is valid. If you don't include an email address field in your form, the email will be sent from the store domain email address.
  • MvCONTACT_verify_email: use this if you want to make them type their email address in twice (highly recommended.)
  • MvCONTACT_required: used to set required fields.
    Example to make MvCONTACT_firstname and MvCONTACT_email required fields: <input type="hidden" name="MvCONTACT_required" value="firstname,email">
  • MvCONTACT_math: used for the math verification field.
    Math verification:   <mvt:item name="MvCONTACT" param="math15" />

    This page item will display a random addition or subtractioon question that doesn't go past around 15 (or whatever number you want to use). The answer field must be named MvCONTACT_math, as in:

    <input type="text" name="MvCONTACT_math">

  • MvCONTACT_fhp: the honeypot method is a nearly foolproof way of filtering out bots.

    Page item:   <mvt:item name="MvCONTACT" param="honeypot" />

    The only other thing you need to do is include the CSS that hides the form field in your CSS file:

    .MvCONTACT-fhp { display: none; }

Success and Error Codes

Use these to display thank you and error messages. The example MvCONTACT form on Scot's Miva Scripts uses all of these things and is a good starting point to build a fully functional form.

  • l.settings:MvCONTACT:success will be set to 1 upon successful sending of the form. You can use it to leave a thankyou message and not display the form.
  • l.settings:MvCONTACT:error will be set to 1 if there is any error in the form.
  • l.settings:MvCONTACT:math_error will be set to 1 if your customer can't add.
  • l.settings:MvCONTACT:fieldname_error will be set to 1 for individual missing field errors or email address issues.

Example Contact Forms

See the MvCONTACT FAQ pages at Scot's Miva Scripts for a more examples, instructions, and some full featured contact form examples, including examples and explanations on how to use the various success and error variables to customize the experience.

This is a very simple working contact form:

<form method="post" action="&mvt:global:sessionurl;Screen=&mvt:global:screen;&Store_Code=&mvte:store:code;" style="width: 350px;">
  <div style="text-align: right;">
   First name: <input type="text" name="MvCONTACT_firstname">
  <br>
  Last name: <input type="text" name="MvCONTACT_lastname">
  <br>
  Email address: <input type="text" name="MvCONTACT_email">
  <br>
  </div>
  Message:
  <br>
  <textarea cols="60" rows="5" name="MvCONTACT_message"></textarea>
  <br>
  <input type="submit" value="Submit Form">
</form>

Example Contact Form Output

First name:
Last name:
Email address:

Message:

updated August 06, 2013

Scot's FAQ Manager Miva Merchant Module: buy now