Skip to content

06 Contact forms

Yegor Borisenco edited this page Feb 29, 2016 · 2 revisions

This theme gives you an ability to choose from two types of form. A "human" version and a classic form.

Form via HTML

If you're not using Jade, you will have to copy the form container you require from one of the skins.

Classic

For classic form use the following, note id="classic-form", that is required:

<div class="col s12 l8 offset-l2">
    <div class="card-panel center hoverable">
        <form id="classic-form" action="mailer/mailer.php" novalidate autocomplete="off" class="row">
          ...
        </form>
    </div>
</div>    

Human

For human form, you'd need to include these lines, again with obligatory id="human-form":

<div class="col s12 l8 offset-l2">
    <div id="human-form" class="card-panel center hoverable">
      ...  
    </div>
</div>

There's no requirement for the <form> element for the human one.

Form via Jade

If you're using Jade, just include the wanted form inside of your block vars by specifying the form type:

- var formType = 'human'

PHP mailer

In order to make the form work and send you the messages you need to configure it. The config file is placed in mailer/ directory. Include all of the required information for the PHP mailer to do its magic. You can also specify the email template color in that configuration.