--> /* Paste this css to your style sheet file or under head tag */ /* This only works with JavaScript, if it's not present, don't show loader */ --> //paste this code under head tag or in a seperate js file. // Wait for window load // Animate loader off screen // function bookAppointment() { // var contact = $("input[name='form_contact']").val(); // var date = $("input[name='form_date']").val(); // var fname = $("input[name='form_fname']").val(); // var lname = $("input[name='form_lname']").val(); // var email = $("input[name='form_email']").val(); // var type = $("select[name='form_type']").val(); // var time = $( "#picktime" ).val(); // var formMessage = $("textarea[name='form_message']").val(); // if(contact != '' && date != '' && time != '' && fname != '' && lname != '' && type != '' && email!= '') { // var phoneregex = /^((\+)?(\d{2}[-])?(\d{10}){1})?(\d{11}){0,1}?$/; // var nameregex = /^[a-zA-Z]+$/; // var emailregex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; // if (phoneregex.test(contact) == false ){ // $('#appoinmentModal .modal-body p').text('Please enter proper mobile number'); // return; // } // else if (nameregex.test(fname) == false || nameregex.test(lname) == false){ // $('#appoinmentModal .modal-body p').text('Please enter proper name'); // return; // } // else if (emailregex.test(email) == false){ // $('#appoinmentModal .modal-body p').text('Please enter proper email'); // return; // } // var message = 'Appointment request made from '+ fname +' for '+ date +', '+ time +'. Mobile number '+ contact +'. for Service "' + type + '".'; // console.log(message); // // send message to client // var clientMsg = 'Hi '+ fname + ', we have received your request for an appointment on '+ date + ', '+ time + '. You will receive the confirmation details shortly.' // // var sendSMSUrl = 'https://nowfloats.com/fp/home/SendSMSNotification'; // var sendSMSUrl = 'https://cqel9n7v70.execute-api.ap-south-1.amazonaws.com/v1/api/SendSMS?' // $.get(sendSMSUrl, { // mobileNumber: contact, // message: clientMsg // }).success(function (result) { // if (result == "OK") { // console.log("Succesfully sent the sms: " + result); // } // }).error(function () { // if (error) { // console.log("Error in sending sms: " + error); // } // }); // // send message to owner // var ownerContact = +919030705080 ; // $.get(sendSMSUrl, { // mobileNumber: ownerContact, // message: message // }).success(function (result) { // if (result == "OK") { // console.log("Succesfully sent the sms: " + result); // } // }).error(function () { // if (error) { // console.log("Error in sending sms: " + error); // } // }); // var floatingID = $("[id='GET-VALUE(FLOATING-TAG)']").text().trim(); // $.ajax({ // url: 'https://webaction.api.boostkit.dev/api/v1/appointment/add-data', // type: 'post', // contentType: 'application/json; charset=utf-8', // data: JSON.stringify({ // "ActionData" :{ // "fname" : fname, // "sname" : lname, // "number": contact, // "email" : email, // "date": date, // "time" : time, // "message" : formMessage, // "type": type // }, // "WebsiteId" : floatingID // }), // headers: { // Authorization: '5b34c22334afc405180cb70e' // }, // success: function(response) { // $('#appoinmentModal').modal('hide'); // console.log("success booked a appointmet"); // $('#booking_confirmation .modal-body p').text(clientMsg); // $('#booking_confirmation').modal('show'); // $("form")[0].reset(); // }, // error: function(xhr, error) { // $('#appoinmentModal .modal-body p').text(error); // } // }); // } else { // $('#appoinmentModal .modal-body p').text('Please enter proper details'); // } // }