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?
Archive
<div class="col-sm-6">
HTML
<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>
<div class="form-group">
<label >Email : </label>
<input type="email" name="email" class="form-control" id="nom" class=""/>
</div>
HTML
<div class="form-group">
<label >Telephone : </label>
<input type="text" name="phone" class="form-control" id="nom" class=""/>
</div>
<div class="form-group">
<label >Message : </label>
<textarea type="text" name="message" class="form-contr ol" cols="5" rows="6" id="nom" class=""></textarea>
</div>
<div class="form-group">
HTML
<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 :)
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!
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 0 | 1333 | 9 years ago | ||
| 2 | 924 | 9 years ago | ||
| 2 | 4055 | 9 years ago | ||
| 1 | 2935 | 9 years ago | ||
| 3 | 1110 | 9 years ago |