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="<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.>' />

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

    <input type='submit' value='Test 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 powered by Disqus