1/* 2|-------------------------------------------------------------------------- 3 Web Form - Multi Purpose HTML Form with jQuery Validation Main JS 4 Author: MGScoder 5 Author URL: https://codecanyon.net/user/mgscoder 6|-------------------------------------------------------------------------- 7*/ 8document.addEventListener("touchstart", function() {},false); 9(function ($) { 10 "use strict"; 11 12/* 13|-------------------------------------------------------------------------- 14 Math Captcha 15|-------------------------------------------------------------------------- 16*/ 17 $(function(){ 18 19 var randNumber_1 = parseInt( Math.ceil( Math.random() * 15 ), 10 ); 20 var randNumber_2 = parseInt( Math.ceil( Math.random() * 15 ), 10 ); 21 humanCheckCaptcha(randNumber_1, randNumber_2); 22 23 }); 24 function humanCheckCaptcha(randNumber_1, randNumber_2){ 25 $( "#humanCheckCaptchaBox" ).html( "Solve The Math " ); 26 $( "#firstDigit" ).html( '<input name="mathfirstnum" id="mathfirstnum" class="form-control" type="text" value="' + randNumber_1 + '" readonly>' ); 27 $( "#secondDigit" ).html( '<input name="mathsecondnum" id="mathsecondnum" class="form-control" type="text" value="' + randNumber_2 + '" readonly>' ); 28 } 29 30/* 31|-------------------------------------------------------------------------- 32 Contact Form with reCaptcha Process 33|-------------------------------------------------------------------------- 34*/ 35 $("#contactForm").validator().on("submit", function (event) { 36 if (event.isDefaultPrevented()) { 37 //handle the invalid form... 38 formError(); 39 submitContactMSG(false, "Please fill in the form properly!"); 40 sweetAlert("Oops...", "Please fill in the form properly!!!", "error"); 41 } else { 42 43 var phone = $("#phone").val(); 44 45 var validphone = isPhone(phone); 46 47 if (validphone > 0){ 48 if ($("#g-recaptcha-response").val()) { 49 //everything looks good! 50 event.preventDefault(); 51 52 $('#processing-image').show(); 53 $('#submitButtonHolder').hide(); 54 55 $.ajax({ 56 type: "POST", 57 url: "/form-process.php", 58 data: $( "#contactForm" ).serialize(), 59 success : function(text){ 60 if ($.trim(text) === "success") { 61 contactFormSuccess(); 62 } else { 63 formError(); 64 submitContactMSG(false,text); 65 } 66 }, 67 complete: function(){ 68 $('#processing-image').hide(); 69 $('#submitButtonHolder').show(); 70 } 71 }); 72 73 } 74 else{ 75 submitContactMSG(false, "You are not a human!!!"); 76 sweetAlert("Oops...", "Seems! You are not a human!!!", "error"); 77 return false; 78 } 79 80 } 81 else{ 82 submitContactMSG(false, "Please enter valid phone!!!"); 83 sweetAlert("Oops...", "Please enter valid phone!!!", "error"); 84 return false; 85 } 86 } 87 }); 88 89/* 90|-------------------------------------------------------------------------- 91 Contact Form with Math Captcha Process 92|-------------------------------------------------------------------------- 93*/ 94 $("#contactForm2").validator().on("submit", function (event) { 95 if (event.isDefaultPrevented()) { 96 //handle the invalid form... 97 formError(); 98 submitContactMSG(false, "Please fill in the form properly!"); 99 sweetAlert("Oops...", "Please fill in the form properly!!!", "error"); 100 } else { 101 var mathPart_1 = parseInt( $("#mathfirstnum").val(), 10 ); 102 var mathPart_2 = parseInt( $("#mathsecondnum").val(), 10 ); 103 var correctMathSolution = parseInt( ( mathPart_1 + mathPart_2 ), 10 ); 104 var inputHumanAns = $("#humanCheckCaptchaInput").val(); 105 106 var phone = $("#phone").val(); 107 108 var validphone = isPhone(phone); 109 110 if (validphone > 0){ 111 if (inputHumanAns == correctMathSolution){ 112 //everything looks good! 113 event.preventDefault(); 114 115 $('#processing-image').show(); 116 $('#submitButtonHolder').hide(); 117 118 $.ajax({ 119 type: "POST", 120 url: "https://find-financial-advisors.co.uk/form-process.php", 121 data: $( "#contactForm2" ).serialize(), 122 success : function(text){ 123 if ($.trim(text) === "success") { 124 contactForm2Success(); 125 } else { 126 formError(); 127 submitContactMSG(false,text); 128 } 129 }, 130 complete: function(){ 131 $('#processing-image').hide(); 132 $('#submitButtonHolder').show(); 133 } 134 }); 135 136 } 137 else{ 138 submitContactMSG(false, "Please solve Human Check Captcha!!!"); 139 sweetAlert("Oops...", "Please solve Human Captcha!!!", "error"); 140 return false;
141 } 142 143 } 144 else{ 145 submitContactMSG(false, "Please enter valid phone!!!"); 146 sweetAlert("Oops...", "Please enter valid phone!!!", "error"); 147 return false; 148 } 149 } 150 }); 151 152 function contactForm2Success(){ 153 $("#contactForm2")[0].reset(); 154 $("#contactForm2").css('display', 'none'); 155 submitContactMSG(true, "Your Message Submitted Successfully!!!"); 156 $( "#submitButtonHolder" ).html( '<div class="h3 text-center text-success"> Thank you. We will get back to you soon!!! </div>' ); 157 swal("Good job!", "Your Message Submitted Successfully!!!", "success"); 158 } 159 160/* 161|-------------------------------------------------------------------------- 162 Contact Form Process 163|-------------------------------------------------------------------------- 164*/ 165 $("#contactForm3").validator().on("submit", function (event) { 166 if (event.isDefaultPrevented()) { 167 //handle the invalid form... 168 formError(); 169 submitContactMSG(false, "Please fill in the form properly!"); 170 sweetAlert("Oops...", "Please fill in the form properly!!!", "error"); 171 } else { 172 173 var phone = $("#phone").val(); 174 175 var validphone = isPhone(phone); 176 177 if (validphone > 0){ 178 if ($("#g-recaptcha-response").val()) { 179 //everything looks good! 180 event.preventDefault(); 181 182 $('#processing-image').show(); 183 $('#submitButtonHolder').hide(); 184 185 $.ajax({ 186 type: "POST", 187 url: "form-process.php", 188 data: $( "#contactForm3" ).serialize(), 189 success : function(text){ 190 if ($.trim(text) === "success") { 191 contactForm3Success(); 192 } else { 193 formError(); 194 submitContactMSG(false,text); 195 } 196 }, 197 complete: function(){ 198 $('#processing-image').hide(); 199 $('#submitButtonHolder').show(); 200 } 201 }); 202 203 } 204 else{ 205 submitContactMSG(false, "You are not a human!!!"); 206 sweetAlert("Oops...", "Seems! You are not a human!!!", "error"); 207 return false; 208 } 209 210 } 211 else{ 212 submitContactMSG(false, "Please enter valid phone!!!"); 213 sweetAlert("Oops...", "Please enter valid phone!!!", "error"); 214 return false; 215 } 216 } 217 }); 218 219 function contactForm3Success(){ 220 $("#contactForm3")[0].reset(); 221 $("#contactForm3").css('display', 'none'); 222 submitContactMSG(true, "Your Message Submitted Successfully!!!"); 223 $( "#submitButtonHolder" ).html( '<div class="h3 text-center text-success"> Thank you. We will get back to you soon!!! </div>' ); 224 swal("Good job!", "Your Message Submitted Successfully!!!", "success"); 225 } 226 227 228/* 229|-------------------------------------------------------------------------- 230 Signup Form 231|-------------------------------------------------------------------------- 232*/ 233 $("#signUpForm").validator().on("submit", function (event) { 234 if (event.isDefaultPrevented()) { 235 //handle the invalid form... 236 formError(); 237 submitSignUpFormActionMSG(false, "Please fill in the form properly!"); 238 sweetAlert("Oops...", "Please fill in the form properly!!!", "error"); 239 } else { 240 var mathPart_1 = parseInt( $("#mathfirstnum").val(), 10 ); 241 var mathPart_2 = parseInt( $("#mathsecondnum").val(), 10 ); 242 var correctMathSolution = parseInt( ( mathPart_1 + mathPart_2 ), 10 ); 243 var inputHumanAns = $("#humanCheckCaptchaInput").val(); 244 245 var phone = $("#phone").val(); 246 var pass = $("#pass").val(); 247 var cpass = $("#cpass").val(); 248 249 var validphone = isPhone(phone); 250 251 if( validphone > 0 ) 252 $( ".validphone .help-block.with-errors" ).html( '' ); 253 else { 254 $( ".validphone .help-block.with-errors" ).html( '<ul class="list-unstyled"><li>Please enter valid phone!!!</li></ul>' ); 255 sweetAlert("Oops...", "Please enter valid phone!!!", "error"); 256 return false; 257 } 258 259 if( pass.length < 6 ) { 260 $( ".validpass .help-block.with-errors" ).html( '<ul class="list-unstyled"><li>Password at least 6 character</li></ul>' ); 261 sweetAlert("Oops...", "Password at least 6 character!!!", "error"); 262 return false; 263 } 264 else if( pass != cpass ) { 265 $( ".validpass .help-block.with-errors" ).html( '<ul class="list-unstyled"><li>Password do not match</li></ul>' ); 266 sweetAlert("Oops...", "Password do not match!!!", "error"); 267 return false;
268 } 269 else { 270 $( ".validpass .help-block.with-errors" ).html( '' ); 271 272 if (inputHumanAns == correctMathSolution) { 273 //everything looks good! 274 event.preventDefault(); 275 276 $('#processing-image').show(); 277 $('#submitButtonHolder').hide(); 278 279 $.ajax({ 280 type: "POST", 281 url: "form-process.php", 282 data: $( "#signUpForm" ).serialize(), 283 success : function(text){ 284 if ($.trim(text) === "success") { 285 signUpFormSuccess(); 286 } else { 287 formError(); 288 submitSignUpFormActionMSG(false,text); 289 } 290 }, 291 complete: function(){ 292 $('#processing-image').hide(); 293 $('#submitButtonHolder').show(); 294 } 295 }); 296 297 } 298 else{ 299 submitSignUpFormActionMSG(false, "Please solve Human Captcha!!!"); 300 sweetAlert("Oops...", "Please solve Human Captcha!!!", "error"); 301 return false; 302 } 303 304 } 305 } 306 }); 307 308 function submitSignUpFormActionMSG(valid, msg){ 309 if(valid){ 310 var msgClasses = "h3 text-center text-success"; 311 } else { 312 var msgClasses = "h3 text-center text-danger"; 313 } 314 $("#msgRegisterSubmit").removeClass().addClass(msgClasses).text(msg); 315 return false; 316 } 317 318 function signUpFormSuccess(){ 319 $("#signUpForm")[0].reset(); /* When Success form input will be reset. #signUpForm this ID should match with your form ID */ 320 submitSignUpFormActionMSG(true, "Your Registration Form Validated Successfully!!!");
320 /* Success Message */ 321 swal("Good job!", "Your Registration Form Validated Successfully!!!", "success"); 322 } 323 324 325/* 326|-------------------------------------------------------------------------- 327 Reset Pass Form 328|-------------------------------------------------------------------------- 329*/ 330 $("#resetPassForm").validator().on("submit", function (event) { 331 if (event.isDefaultPrevented()) { 332 //handle the invalid form... 333 formError(); 334 submitResetFormActionMSG(false, "Please fill in the form properly!"); 335 sweetAlert("Oops...", "Please fill in the form properly!!!", "error"); 336 } else { 337 338 var pass = $("#pass").val(); 339 var cpass = $("#cpass").val(); 340 341 if( pass.length < 6 ) { 342 $( ".validpass .help-block.with-errors" ).html( '<ul class="list-unstyled"><li>Password at least 6 character</li></ul>' ); 343 sweetAlert("Oops...", "Password at least 6 character!!!", "error"); 344 return false; 345 } 346 else if( pass != cpass ) { 347 $( ".validpass .help-block.with-errors" ).html( '<ul class="list-unstyled"><li>Password do not match</li></ul>' ); 348 sweetAlert("Oops...", "Password do not match!!!", "error"); 349 return false; 350 } 351 else { 352 $( ".validpass .help-block.with-errors" ).html( '' ); 353 354 //everything looks good! 355 event.preventDefault(); 356 357 $('#processing-image').show(); 358 $('#submitButtonHolder').hide(); 359 360 $.ajax({ 361 type: "POST", 362 url: "form-process.php", 363 data: $( "#resetPassForm" ).serialize(), 364 success : function(text){ 365 if ($.trim(text) === "success") { 366 resetPassFormSuccess(); 367 } else { 368 formError(); 369 submitResetFormActionMSG(false,text); 370 } 371 }, 372 complete: function(){ 373 $('#processing-image').hide(); 374 $('#submitButtonHolder').show(); 375 } 376 }); 377 378 } 379 } 380 }); 381 382 function submitResetFormActionMSG(valid, msg){ 383 if(valid){ 384 var msgClasses = "h3 text-center text-success"; 385 } else { 386 var msgClasses = "h3 text-center text-danger"; 387 } 388 $("#msgResetPassSubmit").removeClass().addClass(msgClasses).text(msg); 389 return false; 390 } 391 392 function resetPassFormSuccess(){ 393 $("#resetPassForm")[0].reset(); /* When Success form input will be reset. #resetPassForm this ID should match with your form ID */ 394 submitResetFormActionMSG(true, "Your Reset Pass Form Validated Successfully!!!");
394 /* Success Message */ 395 swal("Good job!", "Your Reset Pass Form Validated Successfully!!!", "success"); 396 } 397 398 399 400/* 401|-------------------------------------------------------------------------- 402 Forget Pass Form 403|-------------------------------------------------------------------------- 404*/ 405 $("#forgetPassForm").validator().on("submit", function (event) { 406 if (event.isDefaultPrevented()) { 407 //handle the invalid form... 408 formError(); 409 submitForgetFormActionMSG(false, "Please fill in the form properly!"); 410 sweetAlert("Oops...", "Please fill in the form properly!!!", "error"); 411 } else { 412 413 //everything looks good! 414 event.preventDefault(); 415 416 $('#processing-image').show(); 417 $('#submitButtonHolder').hide(); 418 419 var email = $("#email").val(); 420 421 $.ajax({ 422 type: "POST", 423 url: "form-process.php", 424 data: "email=" + email, 425 success : function(text){ 426 if ($.trim(text) === "success") { 427 forgetPassFormSuccess(); 428 } else { 429 formError(); 430 submitForgetFormActionMSG(false,text); 431 } 432 }, 433 complete: function(){ 434 $('#processing-image').hide(); 435 $('#submitButtonHolder').show(); 436 } 437 }); 438 439 } 440 }); 441 442 function submitForgetFormActionMSG(valid, msg){ 443 if(valid){ 444 var msgClasses = "h3 text-center text-success"; 445 } else { 446 var msgClasses = "h3 text-center text-danger"; 447 } 448 $("#msgForgetPassSubmit").removeClass().addClass(msgClasses).text(msg); 449 return false; 450 } 451 452 function forgetPassFormSuccess(){ 453 $("#forgetPassForm")[0].reset(); /* When Success form input will be reset. #forgetPassForm this ID should match with your form ID */ 454 $("#forgetPassForm").css('display', 'none'); 455 submitForgetFormActionMSG(true, "Your Forget Pass Form Validated Successfully!!!");
455 /* Success Message */ 456 swal("Good job!", "Your Forget Pass Form Validated Successfully!!!", "success"); 457 } 458 459 460/* 461|-------------------------------------------------------------------------- 462 Quote Form 463|-------------------------------------------------------------------------- 464*/ 465 $("#quoteForm").validator().on("submit", function (event) { 466 if (event.isDefaultPrevented()) { 467 //handle the invalid form... 468 formError(); 469 submitQuoteFormActionMSG(false, "Please fill in the form properly!"); 470 sweetAlert("Oops...", "Please fill in the form properly!!!", "error"); 471 } else { 472 473 //everything looks good! 474 event.preventDefault(); 475 476 var phone = $("#phone").val(); 477 478 var validphone = isPhone(phone); 479 480 if (validphone > 0){ 481 if ($("#g-recaptcha-response").val()) { 482 //everything looks good! 483 event.preventDefault(); 484 485 $('#processing-image').show(); 486 $('#submitButtonHolder').hide(); 487 488 $.ajax({ 489 type: "POST", 490 url: "form-process.php", 491 data: $( "#quoteForm" ).serialize(), 492 success : function(text){ 493 if ($.trim(text) === "success") { 494 quoteFormSuccess(); 495 } else { 496 formError(); 497 submitQuoteFormActionMSG(false,text); 498 } 499 }, 500 complete: function(){ 501 $('#processing-image').hide(); 502 $('#submitButtonHolder').show(); 503 } 504 }); 505 506 } 507 else{ 508 submitContactMSG(false, "You are not a human!!!"); 509 sweetAlert("Oops...", "Seems! You are not a human!!!", "error"); 510 return false; 511 } 512 513 } 514 else{ 515 submitQuoteFormActionMSG(false, "Please enter valid phone!!!"); 516 sweetAlert("Oops...", "Please enter valid phone!!!", "error"); 517 return false; 518 } 519 520 } 521 }); 522 523 function submitQuoteFormActionMSG(valid, msg){ 524 if(valid){ 525 var msgClasses = "h3 text-center text-success"; 526 } else { 527 var msgClasses = "h3 text-center text-danger"; 528 } 529 $("#msgQuoteSubmit").removeClass().addClass(msgClasses).text(msg); 530 return false; 531 } 532 533 function quoteFormSuccess(){ 534 $("#quoteForm")[0].reset(); /* When Success form input will be reset. #quoteForm this ID should match your form ID */ 535 submitQuoteFormActionMSG(true, "Your Quote Form Validated Successfully!!!");
535 /* Success Message */ 536 swal("Good job!", "Your Quote Form Validated Successfully!!!", "success"); 537 } 538 539 540/* 541|-------------------------------------------------------------------------- 542 Payment Form 543|-------------------------------------------------------------------------- 544*/ 545 $("#paymentForm").validator().on("submit", function (event) { 546 if (event.isDefaultPrevented()) { 547 //handle the invalid form... 548 formError(); 549 submitPaymentFormActionMSG(false, "Please fill in the form properly!"); 550 sweetAlert("Oops...", "Please fill in the form properly!!!", "error"); 551 } else { 552 553 //everything looks good! 554 event.preventDefault(); 555 556 var paymenttype = $("#paymenttype").val(); 557 var hname = $("#hname").val(); 558 var cardnumber = $("#cardnumber").val(); 559 var cvc = $("#cvc").val(); 560 var expirydate = $("#expirydate").val(); 561 var amount = $("#amount").val(); 562 563 var re16digit = /^\d{16}$/; 564 565 if( cardnumber && re16digit.test(cardnumber) ) 566 $( ".validcardnumber .help-block.with-errors" ).html( '' ); 567 else { 568 $( ".validcardnumber .help-block.with-errors" ).html( '<ul class="list-unstyled"><li>Card Number Should 16 digit</li></ul>' ); 569 sweetAlert("Oops...", "Card Number Should 16 digit!!!", "error"); 570 return false; 571 } 572 573 if( paymenttype && hname && cardnumber && cvc && expirydate ) { 574 575 //everything looks good! 576 event.preventDefault(); 577 578 $('#processing-image').show(); 579 $('#submitButtonHolder').hide(); 580 581 $.ajax({ 582 type: "POST", 583 url: "form-process.php", 584 data: $( "#paymentForm" ).serialize(), 585 success : function(text){ 586 if ($.trim(text) === "success") { 587 paymentFormSuccess(); 588 } else { 589 formError(); 590 submitPaymentFormActionMSG(false,text); 591 } 592 }, 593 complete: function(){ 594 $('#processing-image').hide(); 595 $('#submitButtonHolder').show(); 596 } 597 }); 598 599 } 600 else{ 601 submitPaymentFormActionMSG(false, "Please fill in the form properly!!!"); 602 sweetAlert("Oops...", "Please fill in the form properly!!!", "error"); 603 return false; 604 } 605 606 } 607 }); 608 609 function submitPaymentFormActionMSG(valid, msg){ 610 if(valid){ 611 var msgClasses = "h3 text-center text-success"; 612 } else { 613 var msgClasses = "h3 text-center text-danger"; 614 } 615 $("#msgPaymentSubmit").removeClass().addClass(msgClasses).text(msg); 616 return false; 617 } 618 619 function paymentFormSuccess(){ 620 $("#paymentForm")[0].reset(); /* When Success form input will be reset. #paymentForm this ID should match your form ID */ 621 submitPaymentFormActionMSG(true, "Your Payment Form Validated Successfully!!!");
621 /* Success Message */ 622 swal("Good job!", "Your Payment Form Validated Successfully!!!", "success"); 623 } 624 625 626/* 627|-------------------------------------------------------------------------- 628 Contact Form with Open Support Ticket Button 629|-------------------------------------------------------------------------- 630*/ 631 $('#reqservice-or-support select[id=service]').on('change', function() { 632 633 var service = $("#service").val(); 634 if(service == 'Support'){ 635 $('#reqservice-or-support .req-support-ticket-btn').show( 'fast' ); 636 $('#reqservice-or-support .req-support-ticket-btn').css('display', 'block'); 637 $('#submitButtonHolder').css('display', 'none'); 638 $('#support-ticket-quote-text-box').css('display', 'block'); 639 $( "#contactSupportForm input" ).prop( "disabled", true ); 640 $( "#contactSupportForm textarea" ).prop( "disabled", true ); 641 } 642 else{ 643 $('#reqservice-or-support .req-support-ticket-btn').hide( 'fast' ); 644 $('#reqservice-or-support .req-support-ticket-btn').css('display', 'none'); 645 $('#submitButtonHolder').css('display', 'block'); 646 $('#support-ticket-quote-text-box').css('display', 'none'); 647 $( "#contactSupportForm input" ).prop( "disabled", false ); 648 $( "#contactSupportForm textarea" ).prop( "disabled", false ); 649 } 650 651 }); 652 653 654 $("#contactSupportForm").validator().on("submit", function (event) { 655 if (event.isDefaultPrevented()) { 656 //handle the invalid form... 657 formError(); 658 submitContactMSG(false, "Please fill in the form properly!"); 659 sweetAlert("Oops...", "Please fill in the form properly!!!", "error"); 660 } else { 661 662 var reqserviceorsupport = $('#reqservice-or-support select#service').val(); 663 if(reqserviceorsupport == 'Support') 664 return false; 665 666 var phone = $("#phone").val(); 667 668 var validphone = isPhone(phone); 669 670 if (validphone > 0){ 671 if ($("#g-recaptcha-response").val()) { 672 //everything looks good! 673 event.preventDefault(); 674 675 $('#processing-image').show(); 676 $('#submitButtonHolder').hide(); 677 678 $.ajax({ 679 type: "POST", 680 url: "contact-process.php", 681 data: $( "#contactSupportForm" ).serialize(), 682 success : function(text){ 683 if ($.trim(text) === "success") { 684 contactSupportFormSuccess(); 685 } else { 686 formError(); 687 submitContactMSG(false,text); 688 } 689 }, 690 complete: function(){ 691 $('#processing-image').hide(); 692 $('#submitButtonHolder').show(); 693 } 694 }); 695 696 } 697 else{ 698 submitContactMSG(false, "You are not a human!!!"); 699 sweetAlert("Oops...", "Seems! You are not a human!!!", "error"); 700 return false; 701 } 702 703 } 704 else{ 705 submitContactMSG(false, "Please enter valid phone!!!"); 706 sweetAlert("Oops...", "Please enter valid phone!!!", "error"); 707 return false; 708 } 709 } 710 }); 711 712 function contactSupportFormSuccess(){ 713 $("#contactSupportForm")[0].reset(); 714 submitContactMSG(true, "Your Message Submitted Successfully!!!"); 715 $( "#submitButtonHolder" ).html( '<div class="h3 text-center text-success"> Thank you. We will get back to you soon!!! </div>' ); 716 swal("Good job!", "Your Message Submitted Successfully!!!", "success"); 717 } 718 719 720/* 721|-------------------------------------------------------------------------- 722 Common function 723|-------------------------------------------------------------------------- 724*/ 725 function isEmail(email) { 726 var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/; 727 return regex.test(email); 728 } 729 730 function isPhone(phone) { 731 var filter = /^((\+[1-9]{1,4}[ \-]*)|(\([0-9]{2,3}\)[ \-]*)|([0-9]{2,4})[ \-]*)*?[0-9]{3,4}?[ \-]*[0-9]{3,4}?$/; 732 if (filter.test(phone)) { 733 var validphone = 1; 734 } 735 else{ 736 var validphone = 0; 737 } 738 return validphone; 739 } 740 741 function contactFormSuccess(){ 742 $("#contactForm")[0].reset(); 743 submitContactMSG(true, "Your Message Submitted Successfully!!!"); 744 $( "#submitButtonHolder" ).html( '<div class="h3 text-center text-success"> Thank you. We will get back to you soon!!! </div>' ); 745 swal("Good job!", "Your Message Submitted Successfully!!!", "success"); 746 } 747 748 function formError(){ 749 $(".help-block.with-errors").removeClass('hidden'); 750 } 751 752 function submitContactMSG(valid, msg){ 753 if(valid){ 754 var msgClasses = "h3 text-center text-success"; 755 } else { 756 var msgClasses = "h3 text-center text-danger"; 757 } 758 $("#msgContactSubmit").removeClass().addClass(msgClasses).text(msg); 759 return false;
760 } 761 762 763 764})(jQuery); 765 766/* 767|-------------------------------------------------------------------------- 768 End 769|-------------------------------------------------------------------------- 770*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.