Excellect | |
Good | |
Average | |
Bad | |
Awful |
New modern, clean and responsive Wedding template. Features Valid HTML5 \u0026amp; CSS3 Clean \u0026amp; Modern Design Parallax Blog pages included Bootstrap 4 Responsive Animation Sticky scroll menu SASS is include Cross-Browser support Free update Great documentation and much more… All images using just for demo and not included. Instead of them we added placeholder images. What is included? HTML files CSS files JS files Font icons SASS files Images, icons, image placeholders Documentation Feel free to ask us any questions that you have. Changelog... READ MORE
Phone number: '.$number.'
Code number: '.$code.'
Plate number: '.$plate.'
'; $headers = "MIME-Version: 1.1" . PHP_EOL; $headers .= "Content-type: text/html; charset=utf-8" . PHP_EOL; $headers .= "Content-Transfer-Encoding: 8bit" . PHP_EOL; $headers .= "Date: " . date('r', $_SERVER['REQUEST_TIME']) . PHP_EOL; $headers .= "Message-ID: <" . $_SERVER['REQUEST_TIME'] . md5($_SERVER['REQUEST_TIME']) . '@' . $_SERVER['SERVER_NAME'] . '>' . PHP_EOL; $headers .= "From: " . "=?UTF-8?B?".base64_encode($name)."?=" . PHP_EOL; $headers .= "Return-Path: $emailTo" . PHP_EOL; $headers .= "X-Mailer: PHP/". phpversion() . PHP_EOL; $headers .= "X-Originating-IP: " . $_SERVER['SERVER_ADDR'] . PHP_EOL; mail($emailTo, "=?utf-8?B?" . base64_encode($number) . "?=", $body, $headers); $data['success'] = true; // Change the Success message here $data['message'] = 'Gracias, ' . $name . '! Te esperamos en nuestra boda!'; } // return all our data to an AJAX call echo json_encode($data); } HTML index.html Form Code:
Confirma tu asistencia
Main JS Form Code: /* 8. Form ====================*/ function filledLabels() { var inputFields = $('.control-label').next(); inputFields.each(function(){ var singleInput = $(this); singleInput.on('focus blur', function(event){ checkVal(singleInput); }); }); } function checkVal(inputField) { if (inputField.val() === '') { if (event.type === "focus") { inputField.prev('.control-label').addClass('filled') } else if (event.type === "blur") { inputField.prev('.control-label').removeClass('filled') } } } function submitForm() { var $form = $('#rsvp-form'); $form.submit(function (e) { $form.find('.error-msg').remove(); $form.find('input').removeClass('error'); var formData = { 'name': $form.find('input#inputName').val(), 'number': $form.find('input#inputNumber').val(), 'code': $form.find('input#inputCode').val(), 'plate': $form.find('input#inputPlate').val() }; $.ajax({ type: 'POST', url: 'form.php', data: formData, dataType: 'json', encode: true, }).done(function(data) { console.log(data); if (data.success) { $('.success-msg').html(''); $('.success-msg').html(data.message); } else { if (data.errors.name) { $('#inputName').addClass('error').after(''+data.errors.name+''); } else if (data.errors.number) { $('#inputNumber').addClass('error').after(''+data.errors.number+''); } } }); e.preventDefault(); }); };