HELLO I NEED TO MAKE MY FORM CONTACT WORK
IT NEEDS TO BE ABLE TO UPLOAD A FILE AND TAKE INTO ACCOUNT THE MYCAPTCHA GROM GOOGLE
AND THE ALERT MUST BE INLINE AS IT IS
BUT STILL IT DOESNT WORK I DONT KNOW WHY
LAST PROBLEM TO FIX BEFORE UPLOADING
18 replies · opened Jun 3, 2016
Hello,
Please add the data-alert-type="inline" attribute to the .contact-widget Element.
Add the enctype="multipart/form-data" attribute to the <form> Tag.
Make sure that you are using the Latest Version of the include/sendemail.php File and added the Google reCaptcha Secret Key in this File.
These should fix your issue. Let us know if we can help you with anything else or if you find any further issues.
excuse me but all of this has already been done, please check it because it is not working :(
'info@eden-boites.com', // Your Email Address
'name' => 'EDEN BOITES' // Your Name
);
// Form Processing Messages
$message_success = 'Votre demande a été envoyée avec **succès**, nous vous répondrons dans les plus brefs délais.';
// Add this only if you use reCaptcha with your Contact Forms
$recaptcha_secret = '6LfnZyATAAAAADTj8fBlcwbHEP1cdskHG6XUOgdU'; // Your reCaptcha Secret
$mail = new PHPMailer();
$autoresponder = new PHPMailer();
// If you intend to use SMTP, add your SMTP Code after this Line
if( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
if( $_POST['template-contactform-nom'] != '' AND $_POST['template-contactform-email'] != '' AND $_POST['template-contactform-immatriculation'] != '' ) {
$piece = $_POST['template-contactform-piece'];
$genrebv = $_POST['template-contactform-genrebv'];
$marque = $_POST['template-contactform-marque'];
$modele = $_POST['template-contactform-modele'];
$cylindree = $_POST['template-contactform-cylindree'];
$genre = $_POST['template-contactform-genre'];
$annee = $_POST['template-contactform-annee'];
$type = $_POST['template-contactform-type'];
$vin = $_POST['template-contactform-vin'];
$immatriculation = $_POST['template-contactform-immatriculation'];
$reference = $_POST['template-contactform-reference'];
$nom = $_POST['template-contactform-nom'];
$ville = $_POST['template-contactform-ville'];
$email = $_POST['template-contactform-email'];
$telephone = $_POST['template-contactform-telephone'];
$message = $_POST['template-contactform-message'];
$subject = isset($subject) ? $subject : 'Demande de BV | EDEN BOITES';
$botcheck = $_POST['template-contactform-botcheck'];
if( $botcheck == '' ) {
$mail->SetFrom( $email , utf8_decode($nom));
$mail->AddReplyTo( $email , utf8_decode($nom));
foreach( $toemails as $toemail ) {
$mail->AddAddress( $toemail , utf8_decode($tonom));
}
$mail->Subject = $subject;
// AutoResponder Settings
$autoresponder->SetFrom( $toemail , $toname );
$autoresponder->AddReplyTo( $toemail , $toname );
$autoresponder->AddAddress( $email , $name );
$autoresponder->Subject = 'We\'ve received your Email';
$piece = isset($piece) ? "Pièce: $piece
" : '';
$marque = isset($marque) ? "Marque: $marque
" : '';
$modele = isset($modele) ? "Modèle: $modele
" : '';
$genre = isset($genre) ? "Genre: $genre
" : '';
$cylindree = isset($cylindree) ? "Cylindrée: $cylindree
" : '';
$cvdin = isset($cvdin) ? "CV Din: $cvdin
" : '';
$annee = isset($annee) ? "Année: $annee
" : '';
$type = isset($type) ? "Type MINES: $type
" : '';
$vin = isset($vin) ? "Chassis: $vin
" : '';
$immatriculation = isset($immatriculation) ? "Immatriculation: $immatriculation
" : '';
$reference = isset($reference) ? "Référence: $reference
" : '';
$genrebv = isset($genrebv) ? "Genre BV: $genrebv
" : '';
$nom = isset($nom) ? "Nom: $nom
" : '';
$ville = isset($ville) ? "Ville: $ville
" : '';
$email = isset($email) ? "e-Mail: $email
" : '';
$telephone = isset($telephone) ? "Téléphone: $telephone
" : '';
$message = isset($message) ? "Message: $message
" : '';
$referrer = $_SERVER['HTTP_REFERER'] ? '
This Form was submitted from: ' . $_SERVER['HTTP_REFERER'] : '';
$body = "$piece $marque $modele $genre $cylindree $cvdin $annee $type $vin $immatriculation $reference $genrebv $nom $ville $email $telephone $message";
// AutoResponder Message
$ar_body = "Bonjour Mme / M. $nom,
Nous avons bien pris en compte votre demande de $piece $genrebv pour $marque $modele, et vous en remercions.
Nous vous répondrons dans les plus brefs délais.
À bientôt !
EDEN BOITES
http://www.eden-boites.com
Tel: +33 (0)4-86-11-93-69
Résumé de votre message:
";
$piece = isset($piece) ? "Pièce: $piece
" : '';
$marque = isset($marque) ? "Marque: $marque
" : '';
$modele = isset($modele) ? "Modèle: $modele
" : '';
$genre = isset($genre) ? "Genre: $genre
" : '';
$cylindree = isset($cylindree) ? "Cylindrée: $cylindree
" : '';
$cvdin = isset($cvdin) ? "CV Din: $cvdin
" : '';
$annee = isset($annee) ? "Année: $annee
" : '';
$type = isset($type) ? "Type MINES: $type
" : '';
$vin = isset($vin) ? "Chassis: $vin
" : '';
$immatriculation = isset($immatriculation) ? "Immatriculation: $immatriculation
" : '';
$reference = isset($reference) ? "Référence: $reference
" : '';
$genrebv = isset($genrebv) ? "Genre BV: $genrebv
" : '';
$nom = isset($nom) ? "Nom: $nom
" : '';
$ville = isset($ville) ? "Ville: $ville
" : '';
$email = isset($email) ? "e-Mail: $email
" : '';
$telephone = isset($telephone) ? "Téléphone: $telephone
" : '';
$message = isset($message) ? "Message: $message
" : '';
// Runs only when File Field is present in the Contact Form
if ( isset( $_FILES['template-contactform-file'] ) && $_FILES['template-contactform-file']['error'] == UPLOAD_ERR_OK ) {
$mail->IsHTML(true);
$mail->AddAttachment( $_FILES['template-contactform-file']['tmp_name'], $_FILES['template-contactform-file']['name'] );
}
// Runs only when reCaptcha is present in the Contact Form
if( isset( $_POST['g-recaptcha-response'] ) ) {
$recaptcha_response = $_POST['g-recaptcha-response'];
$response = file_get_contents( "https://www.google.com/recaptcha/api/siteverify?secret=" . $recaptcha_secret . "&response=" . $recaptcha_response );
$g_response = json_decode( $response );
if ( $g_response->success !== true ) {
echo '{ "alert": "error", "message": "Captcha incorrect ! Merci de réessayer." }';
die;
}
}
$mail->MsgHTML( $body );
$autoresponder->MsgHTML( $body );
$sendEmail = $mail->Send();
if( $sendEmail == true ):
$send_arEmail = $autoresponder->Send();
echo '{ "alert": "success", "message": "' . $message_success . '" }';
else:
echo '{ "alert": "error", "message": "Votre demande n\'a **pas** été envoyée à cause d\'une erreur. Merci de réessayer.
**Motif de l\'erreur:**
' . $mail->ErrorInfo . '" }';
endif;
} else {
echo '{ "alert": "error", "message": "Bot **Detected**.! Clean yourself Botster.!" }';
}
} else {
echo '{ "alert": "error", "message": "Merci de **remplir** tous les champs requis et de réessayer." }';
}
} else {
echo '{ "alert": "error", "message": "Une **erreur inattendue** a eu lieu. Merci de réessayer plus tard." }';
}
?>THE PROBLEM DISAPEARS WHEN I DELETE THIS SCRIPT
BUT I WANT THIS SCRIPT TO WORK PLEASE
<script type="text/javascript">
var substringMatcher = function(strs) {
return function findMatches(q, cb) {
var matches, substringRegex;
// an array that will be populated with substring matches
matches = [];
// regex used to determine if a string contains the substring `q`
substrRegex = new RegExp(q, 'i');
// iterate through the pool of strings and for any string that
// contains the substring `q`, add it to the `matches` array
$.each(strs, function(i, str) {
if (substrRegex.test(str)) {
matches.push(str);
}
});
cb(matches);
};
};
var MARQUES = ['ALFA ROMEO', 'ASTON MARTIN', 'AUDI', 'BENTLEY', 'BMW', 'BRABUS', 'BUGATTI', 'BUICK', 'CADILLAC', 'CHEVROLET', 'CHRYSLER', 'CITROEN', 'CORVETTE', 'DACIA', 'DAEWOO', 'DAIHATSU', 'DODGE', 'FERRARI', 'FIAT', 'FORD', 'HONDA', 'HUMMER', 'HYUNDAI', 'ISUZU', 'IVECO', 'JAGUAR', 'JEEP', 'KIA', 'LADA', 'LAMBORGHINI', 'LANCIA', 'LAND ROVER', 'LEXUS', 'MARUTI', 'MASERATI', 'MAYBACH', 'MAZDA', 'MERCEDES', 'MINI', 'MITSUBISHI', 'NISSAN', 'OPEL', 'PEUGEOT', 'PIAGGIO', 'PONTIAC', 'PORSCHE', 'PROTON', 'RENAULT', 'ROLLS ROYCE', 'ROVER', 'SAAB', 'SEAT', 'SKODA', 'SMART', 'SUBARU', 'SUZUKI', 'TOYOTA', 'VOLKSWAGEN', 'VOLVO', 'AUTRE'
];
$('.typeahead').typeahead({
hint: true,
highlight: true,
minLength: 1
},
{
name: 'MARQUES',
source: substringMatcher(MARQUES)
});
</script>
OKay so after five days i found out that the problem comes from the script under the footer that is typeahead, when i delete the script the contact form works fine ! how could we fix this and ALSO PLEASE HOW TO PUT THE INLINE ALERT NOT ON TOP OF THE FORM BUT JUST UNDER THE SUBMIT FORM BUTTON ? THANKS !!!!!!!!!!!!!!!!
sorry it makes me go crazy but i cant make it work, i updated the sendemail-responder, here is my code, and it says that i must provide at least one recipient when i did
<?php
require_once('phpmailer/PHPMailerAutoload.php');
$toemails = array();
$toemails[] = array(
'email' => 'info@eden-boites.com', // Your Email Address
'name' => 'EDEN BOITES' // Your Name
);
// Form Processing Messages
$message_success = 'Votre demande a été envoyée avec succès, nous vous répondrons dans les plus brefs délais.';
// Add this only if you use reCaptcha with your Contact Forms
$recaptcha_secret = '6LfnZyATAAAAADTj8fBlcwbHEP1cdskHG6XUOgdU'; // Your reCaptcha Secret
$mail = new PHPMailer();
$autoresponder = new PHPMailer();
// If you intend to use SMTP, add your SMTP Code after this Line
if( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
if( $_POST['template-contactform-email'] != '' ) {
$piece = $_POST['template-contactform-piece'];
$genrebv = $_POST['template-contactform-genrebv'];
$marque = $_POST['template-contactform-marque'];
$modele = $_POST['template-contactform-modele'];
$cylindree = $_POST['template-contactform-cylindree'];
$genre = $_POST['template-contactform-genre'];
$annee = $_POST['template-contactform-annee'];
$type = $_POST['template-contactform-type'];
$vin = $_POST['template-contactform-vin'];
$immatriculation = $_POST['template-contactform-immatriculation'];
$reference = $_POST['template-contactform-reference'];
$nom = $_POST['template-contactform-nom'];
$ville = $_POST['template-contactform-ville'];
$email = $_POST['template-contactform-email'];
$telephone = $_POST['template-contactform-telephone'];
$file = $_POST['template-contactform-file'];
$message = $_POST['template-contactform-message'];
$subject = isset($subject) ? $subject : 'Demande de BV | EDEN BOITES';
$botcheck = $_POST['template-contactform-botcheck'];
if( $botcheck == '' ) {
$mail->SetFrom( $email , utf8_decode($nom));
$mail->AddReplyTo( $email , utf8_decode($nom));
foreach( $toemails as $toemail ) {
$mail->AddAddress( $toemail , utf8_decode($tonom));
}
$mail->Subject = $subject;
// AutoResponder Settings
$autoresponder->SetFrom( $toemail , $toname );
$autoresponder->AddReplyTo( $toemail , $toname );
$autoresponder->AddAddress( $email , $name );
$autoresponder->Subject = 'We\'ve received your Email';
$piece = isset($piece) ? "Pièce: $piece<br><br>" : '';
$marque = isset($marque) ? "Marque: $marque<br><br>" : '';
$modele = isset($modele) ? "Modèle: $modele<br><br>" : '';
$genre = isset($genre) ? "Genre: $genre<br><br>" : '';
$cylindree = isset($cylindree) ? "Cylindrée: $cylindree<br><br>" : '';
$cvdin = isset($cvdin) ? "CV Din: $cvdin<br><br>" : '';
$annee = isset($annee) ? "Année: $annee<br><br>" : '';
$type = isset($type) ? "Type MINES: $type<br><br>" : '';
$vin = isset($vin) ? "Chassis: $vin<br><br>" : '';
$immatriculation = isset($immatriculation) ? "Immatriculation: $immatriculation<br><br>" : '';
$reference = isset($reference) ? "Référence: $reference<br><br>" : '';
$genrebv = isset($genrebv) ? "Genre BV: $genrebv<br><br>" : '';
$nom = isset($nom) ? "Nom: $nom<br><br>" : '';
$ville = isset($ville) ? "Ville: $ville<br><br>" : '';
$email = isset($email) ? "e-Mail: $email<br><br>" : '';
$telephone = isset($telephone) ? "Téléphone: $telephone<br><br>" : '';
$file = isset($file) ? "Pièce jointe: $file<br><br>" : '';
$message = isset($message) ? "Message: $message<br><br>" : '';
$referrer = $_SERVER['HTTP_REFERER'] ? '<br><br><br>Ce formulaire a été soumis sur : ' . $_SERVER['HTTP_REFERER'] : '';
$body = "$piece $marque $modele $genre $cylindree $cvdin $annee $type $vin $immatriculation $reference $genrebv $nom $ville $email $telephone $file $message";
// AutoResponder Message
$ar_body = "Bonjour Mme / M. $nom,<br><br>
Nous avons bien pris en compte votre demande de $piece $genrebv pour $marque $modele, et vous en remercions.<br>
Nous vous répondrons dans les plus brefs délais.<br><br>
À bientôt !<br><br>
EDEN BOITES<br>
http://www.eden-boites.com<br>
Tel: +33 (0)4-86-11-93-69<br><br>
Résumé de votre message:<br><br>";
$piece = isset($piece) ? "Pièce: $piece<br>" : '';
$marque = isset($marque) ? "Marque: $marque<br>" : '';
$modele = isset($modele) ? "Modèle: $modele<br>" : '';
$genre = isset($genre) ? "Genre: $genre<br>" : '';
$cylindree = isset($cylindree) ? "Cylindrée: $cylindree<br>" : '';
$cvdin = isset($cvdin) ? "CV Din: $cvdin<br>" : '';
$annee = isset($annee) ? "Année: $annee<br>" : '';
$type = isset($type) ? "Type MINES: $type<br>" : '';
$vin = isset($vin) ? "Chassis: $vin<br>" : '';
$immatriculation = isset($immatriculation) ? "Immatriculation: $immatriculation<br>" : '';
$reference = isset($reference) ? "Référence: $reference<br>" : '';
$genrebv = isset($genrebv) ? "Genre BV: $genrebv<br>" : '';
$nom = isset($nom) ? "Nom: $nom<br>" : '';
$ville = isset($ville) ? "Ville: $ville<br>" : '';
$email = isset($email) ? "e-Mail: $email<br>" : '';
$telephone = isset($telephone) ? "Téléphone: $telephone<br>" : '';
$file = isset($telephone) ? "Pièce jointe: $file<br>" : '';
$message = isset($message) ? "Message: $message<br>" : '';
// Runs only when File Field is present in the Contact Form
if ( isset( $_FILES['template-contactform-file'] ) && $_FILES['template-contactform-file']['error'] == UPLOAD_ERR_OK ) {
$mail->IsHTML(true);
$mail->AddAttachment( $_FILES['template-contactform-file']['tmp_name'], $_FILES['template-contactform-file']['name'] );
}
// Runs only when reCaptcha is present in the Contact Form
if( isset( $_POST['g-recaptcha-response'] ) ) {
$recaptcha_response = $_POST['g-recaptcha-response'];
$response = file_get_contents( "https://www.google.com/recaptcha/api/siteverify?secret=" . $recaptcha_secret . "&response=" . $recaptcha_response );
$g_response = json_decode( $response );
if ( $g_response->success !== true ) {
echo '{ "alert": "error", "message": "Captcha incorrect ! Merci de réessayer, et de préciser que vous n\'êtes pas un robot." }';
die;
}
}
$mail->MsgHTML( $body );
$autoresponder->MsgHTML( $body );
$sendEmail = $mail->Send();
if( $sendEmail == true ):
$send_arEmail = $autoresponder->Send();
echo '{ "alert": "success", "message": "' . $message_success . '" }';
else:
echo '{ "alert": "error", "message": "Votre demande n\'a **pas** été envoyée à cause d\'une erreur. Merci de réessayer.<br /><br />**Motif de l\'erreur:**<br />' . $mail->ErrorInfo . '" }';
endif;
} else {
echo '{ "alert": "error", "message": "Bot **Detected**.! Clean yourself Botster.!" }';
}
} else {
echo '{ "alert": "error", "message": "Merci de **remplir** tous les champs requis et de réessayer." }';
}
} else {
echo '{ "alert": "error", "message": "Une erreur inattendue a eu lieu. Merci de réessayer plus tard." }';
}
?>
please help me to make the typehead work, i had to delete the script at the bottom page to make the contact form work, but i really need the typeahead
and i also want to make the inline alert close to the submit form button instead of on top of the form, thanks !!!
i am sorry but obviously we cant edit our post on the forum anymore, so i send you again the php file that i changed, i receive emails but the autoresponder doest show the text i added and doest show the referrer from the url ! absolutely dont know why
<?php
require_once('phpmailer/PHPMailerAutoload.php');
$toemails = array();
$toemails[] = array(
'email' => 'info@eden-boites.com', // Your Email Address
'name' => 'EDEN BOITES' // Your Name
);
// Form Processing Messages
$message_success = 'Votre demande de devis en ligne a été envoyée avec succès, nous vous répondrons dans les plus brefs délais.';
// Add this only if you use reCaptcha with your Contact Forms
$recaptcha_secret = '6LfnZyATAAAAADTj8fBlcwbHEP1cdskHG6XUOgdU'; // Your reCaptcha Secret
$mail = new PHPMailer();
$autoresponder = new PHPMailer();
// If you intend you use SMTP, add your SMTP Code after this Line
if( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
if( $_POST['template-contactform-email'] != '' ) {
$piece = isset( $_POST['template-contactform-piece'] ) ? $_POST['template-contactform-piece'] : '';
$marque = isset( $_POST['template-contactform-marque'] ) ? $_POST['template-contactform-marque'] : '';
$modele = isset( $_POST['template-contactform-modele'] ) ? $_POST['template-contactform-modele'] : '';
$genre = isset( $_POST['template-contactform-genre'] ) ? $_POST['template-contactform-genre'] : '';
$cylindree = isset( $_POST['template-contactform-cylindree'] ) ? $_POST['template-contactform-cylindree'] : '';
$cvdin = isset( $_POST['template-contactform-cvdin'] ) ? $_POST['template-contactform-cvdin'] : '';
$annee = isset( $_POST['template-contactform-annee'] ) ? $_POST['template-contactform-annee'] : '';
$type = isset( $_POST['template-contactform-type'] ) ? $_POST['template-contactform-type'] : '';
$vin = isset( $_POST['template-contactform-vin'] ) ? $_POST['template-contactform-vin'] : '';
$immatriculation = isset( $_POST['template-contactform-immatriculation'] ) ? $_POST['template-contactform-immatriculation'] : '';
$reference = isset( $_POST['template-contactform-reference'] ) ? $_POST['template-contactform-reference'] : '';
$genrebv = isset( $_POST['template-contactform-genrebv'] ) ? $_POST['template-contactform-genrebv'] : '';
$nom = isset( $_POST['template-contactform-nom'] ) ? $_POST['template-contactform-nom'] : '';
$ville = isset( $_POST['template-contactform-ville'] ) ? $_POST['template-contactform-ville'] : '';
$email = isset( $_POST['template-contactform-email'] ) ? $_POST['template-contactform-email'] : '';
$telephone = isset( $_POST['template-contactform-telephone'] ) ? $_POST['template-contactform-telephone'] : '';
$message = isset( $_POST['template-contactform-message'] ) ? $_POST['template-contactform-message'] : '';
$subject = isset($subject) ? $subject : 'Demande de BV | EDEN BOITES';
$botcheck = $_POST['template-contactform-botcheck'];
if( $botcheck == '' ) {
$mail->SetFrom( $email , utf8_decode($nom));
$mail->AddReplyTo( $email , utf8_decode($nom));
foreach( $toemails as $toemail ) {
$mail->AddAddress( $toemail['email'] , $toemail['nom'] );
}
$mail->Subject = $subject;
// AutoResponder Settings
$autoresponder->SetFrom( $toemail , utf8_decode($tonom) );
$autoresponder->AddReplyTo( $toemail , utf8_decode($tonom) );
$autoresponder->AddAddress( $email , utf8_decode($nom) );
$autoresponder->Subject = utf8_decode('Nous avons bien reçu votre demande');
// AutoResponder Message
$ar_body = "Bonjour Mme / M. $nom,<br><br>
Nous avons bien pris en compte votre demande de $piece $genrebv pour $marque $modele, et vous en remercions.<br>
Nous vous répondrons dans les plus brefs délais.<br><br>
À bientôt !<br><br>
EDEN BOITES<br>
http://www.eden-boites.com<br>
Tel: +33 (0)4-86-11-93-69<br><br>
Résumé de votre message:<br><br>";
$piece = isset($piece) ? "Pièce: $piece<br>" : '';
$marque = isset($marque) ? "Marque: $marque<br>" : '';
$modele = isset($modele) ? "Modèle: $modele<br>" : '';
$genre = isset($genre) ? "Genre: $genre<br>" : '';
$cylindree = isset($cylindree) ? "Cylindrée: $cylindree<br>" : '';
$cvdin = isset($cvdin) ? "CV Din: $cvdin<br>" : '';
$annee = isset($annee) ? "Année: $annee<br>" : '';
$type = isset($type) ? "Type MINES: $type<br>" : '';
$vin = isset($vin) ? "Chassis: $vin<br>" : '';
$immatriculation = isset($immatriculation) ? "Immatriculation: $immatriculation<br>" : '';
$reference = isset($reference) ? "Référence: $reference<br>" : '';
$genrebv = isset($genrebv) ? "Genre BV: $genrebv<br>" : '';
$nom = isset($nom) ? "Nom: $nom<br>" : '';
$ville = isset($ville) ? "Ville: $ville<br>" : '';
$email = isset($email) ? "e-Mail: $email<br>" : '';
$telephone = isset($telephone) ? "Téléphone: $telephone<br>" : '';
$message = isset($message) ? "Message: $message<br>" : '';
$referrer = $_SERVER['HTTP_REFERER'] ? '<br><br><br>Demande de devis de boîte de vitesses effectuée depuis: ' . $_SERVER['HTTP_REFERER'] : '';
$body = "$piece<br> $marque<br> $modele<br> $genre<br> $cylindree<br> $cvdin<br> $annee<br> $type<br> $vin<br> $immatriculation<br> $reference<br> $genrebv<br> $nom<br> $ville<br> $email<br> $telephone<br> $message";
// Runs only when File Field is present in the Contact Form
if ( isset( $_FILES['template-contactform-file'] ) && $_FILES['template-contactform-file']['error'] == UPLOAD_ERR_OK ) {
$mail->IsHTML(true);
$mail->AddAttachment( $_FILES['template-contactform-file']['tmp_name'], $_FILES['template-contactform-file']['name'] );
}
// Runs only when reCaptcha is present in the Contact Form
if( isset( $_POST['g-recaptcha-response'] ) ) {
$recaptcha_response = $_POST['g-recaptcha-response'];
$response = file_get_contents( "https://www.google.com/recaptcha/api/siteverify?secret=" . $recaptcha_secret . "&response=" . $recaptcha_response );
$g_response = json_decode( $response );
if ( $g_response->success !== true ) {
echo '{ "alert": "error", "message": "Captcha invalide ! Merci de le vérifier afin de prouver que vous n\'êtes pas un robot." }';
die;
}
}
$mail->MsgHTML( $body );
$autoresponder->MsgHTML( $body );
$sendEmail = $mail->Send();
if( $sendEmail == true ):
$send_arEmail = $autoresponder->Send();
echo '{ "alert": "success", "message": "' . $message_success . '" }';
else:
echo '{ "alert": "error", "message": "Votre demande n\'a **pas** été envoyée à cause d\'une erreur. Merci de réessayer.<br /><br />**Motif de l\'erreur:**<br />' . $mail->ErrorInfo . '" }';
endif;
} else {
echo '{ "alert": "error", "message": "Bot **Detected**.! Clean yourself Botster.!" }';
}
} else {
echo '{ "alert": "error", "message": "Merci de **remplir** tous les champs requis et de réessayer." }';
}
} else {
echo '{ "alert": "error", "message": "Une erreur inattendue a eu lieu. Merci de réessayer plus tard." }';
}
?>
Hello,
We have carefully checked your Website and the issues we have mentioned earlier remains. There is no need to remove the Typeahead Script on the Page. Please follow the issues on your Page and fix them:
Please add the data-alert-type="inline" attribute to the .contact-widget Element. Currently, it is added on the .contact-form-result Element.
Add the enctype="multipart/form-data" attribute to the <form> Tag. Currently your Form Tag look like this:
But, it should look like this:
- Delete the following code from the Page just after the Form as it is not required anymore:
$("#template-contactform").validate({
submitHandler: function(form) {
$('.form-process').fadeIn();
$(form).ajaxSubmit({
target: '#contact-form-result',
success: function() {
$('.form-process').fadeOut();
$('#template-contactform').find('.sm-form-control').val('');
$('#contact-form-result').attr('data-notify-msg', $('#contact-form-result').html()).html('');
SEMICOLON.widget.notifications($('#contact-form-result'));
}
});
}
});
This should definitely fix your issue. Let us know if we can help you with anything else or if you find any further issues.
did you check the page www.eden-boites.com/2.0/demande-en-ligne.html ?
the inline alert remains on top of the form and i want it at the bottom over the button submit please
yes you definitly didnt look at the right page, please look at the new one, because all of my problems from the begining of this post remain :
inline alert is still on top of form when it shouldnt cause i want it over the submit button which is under the form
when i put back the typeahead script at the bottom of the page the submit button doesnt work anymore when i click on it it just scrolls on very tp of page and doesnt submit the form
when i send an email (after deleting the typehaed script for it to work unluckily) the autoresponse doesnt show the text i added to my sendemail-autoresponder.php file !
thanks its so urgent the website should have been online for more than a week
Hello,
We have just checked out your Page. Please move the .contact-form-result Element to the position inside the Form you would like to display your Inline Alert.
Additionally, you have Edited the Code incorrectly. Please find the following code on your Page:
and replace it with:
This will definitely work fine. Let us know if we can help you with anything else or if you find any further issues.
EXCELLENT THANKS
and also
when i put back the typeahead script at the bottom of the page the submit button doesnt work anymore when i click on it it just scrolls on very tp of page and doesnt submit the form
when i send an email (after deleting the typehaed script for it to work unluckily) the autoresponse doesnt show the text i added to my sendemail-autoresponder.php file !
i confirm, i just put back the script and the button submit doesnt work anymore
<script type="text/javascript">
var substringMatcher = function(strs) {
return function findMatches(q, cb) {
var matches, substringRegex;
// an array that will be populated with substring matches
matches = [];
// regex used to determine if a string contains the substring `q`
substrRegex = new RegExp(q, 'i');
// iterate through the pool of strings and for any string that
// contains the substring `q`, add it to the `matches` array
$.each(strs, function(i, str) {
if (substrRegex.test(str)) {
matches.push(str);
}
});
cb(matches);
};
};
var MARQUES = ['ALFA ROMEO', 'ASTON MARTIN', 'AUDI', 'BENTLEY', 'BMW', 'BRABUS', 'BUGATTI', 'BUICK', 'CADILLAC', 'CHEVROLET', 'CHRYSLER', 'CITROEN', 'CORVETTE', 'DACIA', 'DAEWOO', 'DAIHATSU', 'DODGE', 'FERRARI', 'FIAT', 'FORD', 'HONDA', 'HUMMER', 'HYUNDAI', 'ISUZU', 'IVECO', 'JAGUAR', 'JEEP', 'KIA', 'LADA', 'LAMBORGHINI', 'LANCIA', 'LAND ROVER', 'LEXUS', 'MARUTI', 'MASERATI', 'MAYBACH', 'MAZDA', 'MERCEDES', 'MINI', 'MITSUBISHI', 'NISSAN', 'OPEL', 'PEUGEOT', 'PIAGGIO', 'PONTIAC', 'PORSCHE', 'PROTON', 'RENAULT', 'ROLLS ROYCE', 'ROVER', 'SAAB', 'SEAT', 'SKODA', 'SMART', 'SUBARU', 'SUZUKI', 'TOYOTA', 'VOLKSWAGEN', 'VOLVO', 'AUTRE'
];
$('.typeahead').typeahead({
hint: true,
highlight: true,
minLength: 1
},
{
name: 'MARQUES',
source: substringMatcher(MARQUES)
});
</script>
the problem comes precisely from the sm-form-control required !!
when i take out the required it works and the form is submitted, but i need it to be required, how to do please ?
and when i send an email (after deleting the typehaed script for it to work unluckily) the autoresponse doesnt show the text i added to my sendemail-autoresponder.php file !
I will close this thread and open a last one, because I cant edit the post it becomes too much confusing sorry
can you close this thread please
Have the same question, or something new?
Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.
Reply on the dashboard