/ contact page Form Html php JS -
Phone Gap / Cordova

Contact Form 3

: contact.html

: contact.html contact.php

: contact.html contact.php contact.js


php local

contact.html action contact.php



I have an issue with contact form, I had added my email inside the php file,
but while sending an email by the form it always give me the message We ll back shortly! 
with out any email sent !

I had solved the issue, the steps was :
 First step :
I had opened file page-contact and edited <form  action=php/contact.php method=post class=contactForm  id=contactForm>
by changing the action directory url from php/contact.php as local to  https://www.mydomainsite.com/contact.php as webcloud

 Second step :
I had opened my hosting and uploaded inside folder www your provider file php/contact.php with out any change
to be like that url https://www.mydomainsite.com/contact.php

<form action="https://www.mydomainsite.com/contact.php" method="post" class="contactForm" id="contactForm">
                                    <div class="formValidationError bg-red-dark" id="contactNameFieldError">
                                        <p class="center-text uppercase small-text color-white">Name is required!</p>
                                    <div class="formValidationError bg-red-dark" id="contactEmailFieldError">
                                        <p class="center-text uppercase small-text color-white">Mail address required!</p>
                                    <div class="formValidationError bg-red-dark" id="contactEmailFieldError2">
                                        <p class="center-text uppercase small-text color-white">Mail address must be valid!</p>
                                    <div class="formValidationError bg-red-dark" id="contactMessageTextareaError">
                                        <p class="center-text uppercase small-text color-white">Message field is empty!</p>
                                    <div class="formFieldWrap">
                                        <label class="field-title contactNameField" for="contactNameField">Name:<span>(required)</span></label>
                                        <input type="text" name="contactNameField" value="" class="contactField requiredField" id="contactNameField"/>
                                    <div class="formFieldWrap">
                                        <label class="field-title contactEmailField" for="contactEmailField">Email: <span>(required)</span></label>
                                        <input type="text" name="contactEmailField" value="" class="contactField requiredField requiredEmailField" id="contactEmailField"/>
                                    <div class="formTextareaWrap">
                                        <label class="field-title contactMessageTextarea" for="contactMessageTextarea">Message: <span>(required)</span></label>
                                        <textarea name="contactMessageTextarea" class="contactTextarea requiredField" id="contactMessageTextarea"></textarea>
                                    <div class="formSubmitButtonErrorsWrap contactFormButton">
                                        <input type="submit" class="buttonWrap button button-green contactSubmitButton" id="contactSubmitButton" value="Send Message" data-formId="contactForm"/>

    // variables start
    $name = "";
    $email = "";
    $message = "";
    $name =  trim($_POST['contactNameField']);
    $email =  trim($_POST['contactEmailField']);
    $message =  trim($_POST['contactMessageTextarea']);
    // variables end
    // email address starts
    $emailAddress = '[email protected]';
    // email address ends
    $subject = "Message From: $name";    
    $message = "<strong>From:</strong> $name <br/><br/> <strong>Message:</strong> $message";
    $headers .= 'From: '. $name . '<' . $email . '>' . "\r\n";
    $headers .= 'Reply-To: ' . $email . "\r\n";
    $headers .= 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    //send email function starts
    mail($emailAddress, $subject, $message, $headers);
    //send email function ends


<form action="#" method="get">
    <div class="form-element">
        <label for="FirstName">Firstname</label>
        <input id="FirstName" name="FirstName" type="text" placeholder="required" required />
    <div class="form-element">
        <label for="LastName">Lastname</label>
        <input id="LastName" name="LastName" type="text" placeholder="required" required />
    <div class="form-element">
        <label for="Email">Email</label>
        <input id="Email" name="Email" type="email" placeholder="optional" />
    <div class="form-element">
        <label for="MessageText">Message</label>
        <textarea id="MessageText" name="MessageText" placeholder="required" rows="5" required ></textarea>
    <input type="button" value="submit"/>

// When the document has loaded...

  $('input[type="button"][value="submit"]').click(function() {
    $.post('http://cafedeweb.com/www/handler.php', {

      FirstName: $('#FirstName').val(),
      LastName: $('#LastName').val(),
      Email: $('#Email').val(),
      MessageText: $('#MessageText').val()

      // HTML function

      }, function (html) {
          // Place the HTML in a astring
          var response=html;

          // PHP was done and email sent
          if (response=="success") {
            alert("Message sent!"); 
          } else {

            // Error postback
            alert("Please fill all fields!"); 
            return false;