Heeelp contact form

Hello! i need your help concerning a contact form, so i created my own form inside a page “default.md” , in the form action i mentionned “sendcontact.php” this page calls a folder “Mail” this folder contains the PHPMailer class but appearently the page doesn’t execute php code? any thoughts?

                  <form action="sendcontact.php" class="" method="post" >
                             <div class="form-group">
                        <label >Nom : </label>  
                        <input type="text" name="nom"  class="form-control" id="nom" class=""/>
                       <div class="form-group">
                        <label >Email : </label>  
                         <div class="form-group">
                        <label >Telephone : </label>  
                        <input type="text" name="phone"  class="form-control" id="nom" class=""/>
                             <div class="form-group">
                        <label >Message : </label>  
                        <textarea type="text" name="message"  class="form-contr ol" cols="5" rows="6" id="nom" class=""></textarea>
                        <input type="submit" name="send" value="envoyer" class="form-control btn btn-success" />
                             </div>                                                  </form>

This approach is not going to work.

Grav provides a handy Form plugin which does most of the work for you, and here’s a simple example of how to setup a contact form

The form plugin works well and we’ve used it a lot. The other method I’ve used is to do an ajax form so I can handle the processing myself and have it use phpmailer in an external folder.

Thank you so much! it worked :slight_smile:

Hi guys, I did some editing in the form plugin for my contact-us forms and it looks awesome for www.drinkharder.com GRAV rocks!