Contact By LemonStand

Contact

Free

Added: June, 29, 2011
Category: Other modules
Version: 0.1.1 - view changes
Downloads: 854

Please log in to download this product.

Provides a contact form for your store. If you want to have a contact page on your site, you can use this module with some custom code found below. If you cannot get the code working, you should post in the discussion thread.

Installation

  1. Download.
  2. Setup the configuration in the control panel under System -> Settings -> Contact module settings.
  3. Setup your code as described in the Usage section.
  4. Done!

Links

Ajax Actions

  • contact:on_submit

Usage

Create a `Contact` page with this content. PHP themes:

<?
	$redirect = root_url('/');
	$name = post('name', 'Name');
	$email = post('email', 'Email');
	$message = post('message', 'Comment/Question');
	$phone = post('phone', 'Phone');
?>
<h1>Contact</h1>
<?= open_form(array('onsubmit' => "return $(this).sendRequest('contact:on_submit')")) ?>
  <input type="hidden" name="redirect" value="<?= $redirect ?>" />
  <input type="hidden" name="flash" value="Thank you! We will get back to you shortly." />
  <ul>
    <li>
      <input type="text" name="name" value="<?= $name ?>" />
    </li>
    <li>
      <input type="text" name="email" value="<?= $email ?>" />
    </li>
    <li>
      <textarea name="message" cols="32" rows="12"><?= $message ?></textarea>
    </li>
    <li>
      <input type="text" name="phone" value="<?= $phone ?>" />
    </li>
  </ul>
  <input type="submit" value="Submit" />
<?= close_form() ?>

Twig themes:

{% set redirect = root_url('/') %}
{% set name = post('name', 'Name') %}
{% set email = post('email', 'Email') %}
{% set message = post('message', 'Comment/Question') %}
{% set phone = post('phone', 'Phone') %}
<h1>Contact</h1>
{{ open_form({'onsubmit': "return $(this).sendRequest('contact:on_submit')"}) }}
  <input type="hidden" name="redirect" value="{{ redirect }}" />
  <input type="hidden" name="flash" value="Thank you! We will get back to you shortly." />
  <ul>
    <li>
      <input type="text" name="name" value="{{ name }}" />
    </li>
    <li>
      <input type="text" name="email" value="{{ email }}" />
    </li>
    <li>
      <textarea name="message" cols="32" rows="12">{{ message }}</textarea>
    </li>
    <li>
      <input type="text" name="phone" value="{{ phone }}" />
    </li>
  </ul>
  <input type="submit" value="Submit" />
{{ close_form() }}

Customer reviews

There are no reviews for this product.

Please log in if you want to write a review. Only customers who have ordered this product can post reviews.