'); jQuery("#wdform_" + index + "paypal_products" + form_id).empty(); break; case 'type_captcha': jQuery("#wd_captcha_input" + form_id).val(''); break; case 'type_arithmetic_captcha': jQuery("#wd_arithmetic_captcha_input" + form_id).val(''); break; default: break; } }); return; } if (but_type == 'clear') { var clear_data = confirm("Are you sure to clear saved data?"); if (clear_data == true) { jQuery.get('https://crarts.ca/wp-admin/admin-ajax.php?action=FMSaveProg&addon_task=clear_data&form_id=7').done(function ( data ) { window.location = "/membership-registration/"; }); } return; } if (window.before_submit) { if (before_submit()) return false; } if (but_type != 'save') { if (!wd_is_filled(form_id)) return false; if (!wd_check_regExp(form_id)) return false; if (!wd_check_price_min_max(form_id)) return false; if (!wd_spinner_check(form_id)) return false; if (!wd_file_upload_check(form_id)) return false; x = jQuery("#form" + form_id); } var a = []; if (typeof a[form_id] !== 'undefined' && a[form_id] == 1) { return; } jQuery("").val(jQuery("#wdform_13_element7 option:selected").text()).appendTo("#form7"); jQuery("").val("Quantity").appendTo("#form7"); jQuery("").val("").appendTo("#form7"); var disabled_fields =""; jQuery("div[wdid]").each(function() { if(jQuery(this).css("display")=="none") { disabled_fields += jQuery(this).attr("wdid"); disabled_fields += ","; } if(disabled_fields) jQuery("").appendTo("#form7"); });jQuery("").appendTo("#form"+form_id); a[form_id] = 1; var checkStripe = 2; if (checkStripe == 1) { var jq_mainForm = jQuery("form[id='form" + form_id + "']"); if (jq_mainForm.find(".wdfm_stripe_elem").first().parents(".wdform_row").is(":visible")) { wdfm_call_stripe(); } else { document.getElementById("form" + form_id).submit(); } } else { document.getElementById("form" + form_id).submit(); } } function check7(id, form_id) { if (!wd_is_filled(form_id)) return false; if (!wd_check_regExp(form_id)) return false; if (!wd_check_price_min_max(form_id)) return false; if (!wd_spinner_check(form_id)) return false; if (!wd_file_upload_check(form_id)) return false; x = jQuery("#7form_view" + id); return true; }