All needed files are in /form directory.
Remember to includeon page.
To configure form just edit form/config.php and change e-mails to your own :
1 2 |
$to = "mail@example.com"; $from = "mail@example.com"; |
That’s it!
You can create contact form with a use of:
- Input
- Textarea
- Submit button
–Input
HTML markup
1 2 3 4 |
<div class="form-group"> <input type="text" placeholder="Name" id="name" name="field[]" required="required" class="form-control"> <label for="name" class="sr-only">Name</label> </div> |
–Textarea
HTML markup
1 2 3 4 |
<div class="form-group"> <textarea placeholder="Your Comment" id="comment" rows="4" required="required" name="field[]" class="form-control"></textarea> <label for="comment" class="sr-only">Your Comment</label> </div> |
–Submit button
HTML markup
1 2 3 |
<button type="submit" class="btn btn-motive"> Add Comment </button> |
Screenshot
Options (can be changed in HTML) :
- Mail Subject – just change value in :
- Success Message – change successMessage div content
- Error Message – change errorMessage div content