How to create a contact form in Spress?

It's probably that soon or later you need to integrate a contact form in your site. To do it, you can use Get simple form service that allows you setup forms with any kind of data. To use this service only requires a token that you will receive by email.

<form action="http://getsimpleform.com/messages?form_api_token=<form_api_token>" method="post">

    <!-- 
        the redirect_to is optional, the form will 
        redirect to the referrer on submission 
    -->
    <input type='hidden' name='redirect_to' 
        value='<e.g. http://yoursite.com/thank-you.html>' />

    <!-- all your input fields here.... -->
    <input type='text' name='test' />

    <input type='submit' value='Test form' />
</form>

The above code shows us how to setup a form. The hidden field redirect_to allows us set a redirect URL for when the form is submitted. For each form submitted you receive a email.

Posted by Victor Puertas on

Comments

comments powered by Disqus