AJAX Contact Form

To configure contact form you should change variables in file php/ajax-contact-form.php:

    • $address_destination – destination address (email), where will send a message;
    • $message_subject – the subject of the message;
    • $strings – array with strings to change/translate it;
    • $demo – demo mode. Set it to false on production;

HTML Example:

<form action="php/contact.php" class="nk-form nk-form-ajax">
    <div class="row vertical-gap">
        <div class="col-md-6">
            <input type="text" class="form-control required" name="name" placeholder="Your Name">
        </div>
        <div class="col-md-6">
            <input type="email" class="form-control required" name="email" placeholder="Your Email">
        </div>
    </div>

    <div class="nk-gap-1"></div>
    <textarea class="form-control required" name="message" rows="8" placeholder="Your Message" aria-required="true"></textarea>
    <div class="nk-gap-1"></div>
    <div class="nk-form-response-success"></div>
    <div class="nk-form-response-error"></div>
    <button class="nk-btn nk-btn-effect-2-right nk-btn-color-dark-1">
        <span>Send</span>
        <span class="icon"><i class="ion-paper-airplane"></i></span>
    </button>
</form>

 

Was this page helpful?