Server IP : 150.95.80.236 / Your IP : 18.191.239.251 Web Server : Apache System : Linux host-150-95-80-236 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64 User : social-telecare ( 10000) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/pcu.in.th/uat.pcu.in.th/demo15/dist/assets/js/custom/documentation/forms/formvalidation/ |
Upload File : |
"use strict";var KTFormValidationDemoBasic={init:function(){!function(){const t=document.getElementById("kt_docs_formvalidation_text");var e=FormValidation.formValidation(t,{fields:{text_input:{validators:{notEmpty:{message:"Text input is required"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap5({rowSelector:".fv-row",eleInvalidClass:"",eleValidClass:""})}});const i=document.getElementById("kt_docs_formvalidation_text_submit");i.addEventListener("click",(function(t){t.preventDefault(),e&&e.validate().then((function(t){console.log("validated!"),"Valid"==t&&(i.setAttribute("data-kt-indicator","on"),i.disabled=!0,setTimeout((function(){i.removeAttribute("data-kt-indicator"),i.disabled=!1,Swal.fire({text:"Form has been successfully submitted!",icon:"success",buttonsStyling:!1,confirmButtonText:"Ok, got it!",customClass:{confirmButton:"btn btn-primary"}})}),2e3))}))}))}(),function(){const t=document.getElementById("kt_docs_formvalidation_email");var e=FormValidation.formValidation(t,{fields:{email_input:{validators:{emailAddress:{message:"The value is not a valid email address"},notEmpty:{message:"Email address is required"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap5({rowSelector:".fv-row",eleInvalidClass:"",eleValidClass:""})}});const i=document.getElementById("kt_docs_formvalidation_email_submit");i.addEventListener("click",(function(t){t.preventDefault(),e&&e.validate().then((function(t){console.log("validated!"),"Valid"==t&&(i.setAttribute("data-kt-indicator","on"),i.disabled=!0,setTimeout((function(){i.removeAttribute("data-kt-indicator"),i.disabled=!1,Swal.fire({text:"Form has been successfully submitted!",icon:"success",buttonsStyling:!1,confirmButtonText:"Ok, got it!",customClass:{confirmButton:"btn btn-primary"}})}),2e3))}))}))}(),function(){const t=document.getElementById("kt_docs_formvalidation_textarea");var e=FormValidation.formValidation(t,{fields:{textarea_input:{validators:{notEmpty:{message:"Textarea input is required"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap5({rowSelector:".fv-row",eleInvalidClass:"",eleValidClass:""})}});const i=document.getElementById("kt_docs_formvalidation_textarea_submit");i.addEventListener("click",(function(t){t.preventDefault(),e&&e.validate().then((function(t){console.log("validated!"),"Valid"==t&&(i.setAttribute("data-kt-indicator","on"),i.disabled=!0,setTimeout((function(){i.removeAttribute("data-kt-indicator"),i.disabled=!1,Swal.fire({text:"Form has been successfully submitted!",icon:"success",buttonsStyling:!1,confirmButtonText:"Ok, got it!",customClass:{confirmButton:"btn btn-primary"}})}),2e3))}))}))}(),function(){const t=document.getElementById("kt_docs_formvalidation_radio");var e=FormValidation.formValidation(t,{fields:{radio_input:{validators:{notEmpty:{message:"Radio input is required"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap5({rowSelector:".fv-row",eleInvalidClass:"",eleValidClass:""})}});const i=document.getElementById("kt_docs_formvalidation_radio_submit");i.addEventListener("click",(function(t){t.preventDefault(),e&&e.validate().then((function(t){console.log("validated!"),"Valid"==t&&(i.setAttribute("data-kt-indicator","on"),i.disabled=!0,setTimeout((function(){i.removeAttribute("data-kt-indicator"),i.disabled=!1,Swal.fire({text:"Form has been successfully submitted!",icon:"success",buttonsStyling:!1,confirmButtonText:"Ok, got it!",customClass:{confirmButton:"btn btn-primary"}})}),2e3))}))}))}(),function(){const t=document.getElementById("kt_docs_formvalidation_checkbox");var e=FormValidation.formValidation(t,{fields:{checkbox_input:{validators:{notEmpty:{message:"Checkbox input is required"}}}},plugins:{trigger:new FormValidation.plugins.Trigger,bootstrap:new FormValidation.plugins.Bootstrap5({rowSelector:".fv-row",eleInvalidClass:"",eleValidClass:""})}});const i=document.getElementById("kt_docs_formvalidation_checkbox_submit");i.addEventListener("click",(function(t){t.preventDefault(),e&&e.validate().then((function(t){console.log("validated!"),"Valid"==t&&(i.setAttribute("data-kt-indicator","on"),i.disabled=!0,setTimeout((function(){i.removeAttribute("data-kt-indicator"),i.disabled=!1,Swal.fire({text:"Form has been successfully submitted!",icon:"success",buttonsStyling:!1,confirmButtonText:"Ok, got it!",customClass:{confirmButton:"btn btn-primary"}})}),2e3))}))}))}()}};KTUtil.onDOMContentLoaded((function(){KTFormValidationDemoBasic.init()}));