GetSimple has basic contact form functionality built in. All the theme template needs is the code below to work.
<form action="<?php get_page_url(); ?>" method="post" class="contactform" >
<?php set_contact_page(); ?>
<p><label>Name:</label><input type="text" class="text" name="contact[name]" /></p>
<p><label>Email:</label><input type="text" class="text" name="contact[email]" /></p>
<p><label>Message:</label><textarea class="text" name="contact[message]" ></textarea></p>
<div class="pot" ><input class="text" type="text" value="" name="contact[pot]" /></div>
<p><input type="submit" class="submit" value="Send Email" id="contact-submit" name="contact-submit" /></p>
</form>
There are only a few requirements for this to work properly:
The
<?php set_contact_page(); ?>up top is needed to include the form's working parts. It is also where the successful or error message is displayed after submission.Each input name attribute should be in the form of an array with the name of "contact". As you can see, each input (it is not necessary for the submit button) has the attribute:
name="contact[xxx]". What you put in place of the 'xxx' will be the description of the field that is send in the email.There is input field called "pot". This is hopefully a working CAPTCHA. The set_contact_page() function spits out "display:none" css style to make it hidden. I found that making the input field hidden instead didn't deter the spammers as much.
There is no limit to the number of fields you can have.
