Documentations: Barberra HTML

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/ajax-contact-form.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-color-dark-1">Send Message</button>
</form>

 

Was this page helpful?