Server : Apache/2.4.58 (Ubuntu) System : Linux yumsem00.cafe24.com 5.4.0-131-generic #147-Ubuntu SMP Fri Oct 14 17:07:22 UTC 2022 x86_64 User : root ( 0) PHP Version : 8.2.14 Disable Function : NONE Directory : /var/www/html/wp-content/themes/jupiterx/api/ |
Upload File : |
jQuery(document).ready(function($) { //Select the Contact Form 7 form by its ID or class var formId = '#wpcf7-f454-o1'; // Replace with your form ID $("#wpcf7-f454-o1 form").on('submit', function(event) { //Prevent the default form submission if needed event.preventDefault(); // Gather form data var formData = { apiKey: "6CCZ8G98LVWFU8P82G0F", // API KEY csName: $(this).find("input[name='your-name']").val(), // 고객명 (필수) csTel: $(this).find("input[name='your-tel']").val(), // 고객연락처 (필수) etc: { "창업문의": $(this).find("select[name= 'list']").val(), "창업희망지역": $(this).find("select[name= 'area']").val(), "이메일": $(this).find("input[name='email']").val(), } }; // Make the AJAX request $.ajax({ url: "https://yumsem.dbmg.kr/api/requestPMDB", type: "POST", data: formData, success: function(response) { console.log('Data sent successfully:', response); // Optionally, submit the form after the AJAX call succeeds event.target.submit(); }, error: function(error) { console.error('Error sending data:', error); } }); }); }); jQuery(document).ready(function($) { // Select the Contact Form 7 form by its ID or class var formId = '#wpcf7-f454-o2'; // Replace with your form ID $("#wpcf7-f454-o2 form").on('submit', function(event) { // Prevent the default form submission if needed event.preventDefault(); // Gather form data var formData = { apiKey: "6CCZ8G98LVWFU8P82G0F", // API KEY csName: $(this).find("input[name='your-name']").val(), // 고객명 (필수) csTel: $(this).find("input[name='your-tel']").val(), // 고객연락처 (필수) etc: { "창업문의": $(this).find("select[name= 'list']").val(), "창업희망지역": $(this).find("select[name= 'area']").val(), "이메일": $(this).find("input[name='email']").val(), } }; // Make the AJAX request $.ajax({ url: "https://yumsem.dbmg.kr/api/requestPMDB", type: "POST", data: formData, success: function(response) { console.log('Data sent successfully:', response); // Optionally, submit the form after the AJAX call succeeds event.target.submit(); }, error: function(error) { console.error('Error sending data:', error); } }); }); });