Close
Advertising

Rules and Regulations

Advertising
val(nam_resource_ctg_original); } if (nam_gated_content_pass) { // Product of interest set by WP custom field in page $(formSelector + ' .gated_post_pwd input').val(nam_gated_content_pass); } // SimplyStatic fix 1: replaces real production dynamic URL with a static one (Forminator field for URL used e.g. in email body) let namDocURL = window.location.href.split('?')[0] // if ($('input[name="current_url"]').val() == '') { if (!$('input[name="current_url"]').val()) { $('input[name="current_url"]').val(namDocURL); } // SimplyStatic fix 2: populate custom hidden field for url, voided after staticization let namZapURL = $('.forminator-row.nam_url > input'); if (!namZapURL.val()) { namZapURL.val(namDocURL); } // SimplyStatic fix 3: populate custom hidden field for gated content, voided after staticization (Project Reports and Analysts forms, hidden-6) let namGatedContentPrefix = 'This is a lead generated from the Gated Content page:'; let namZapGated = $('.forminator-row.zap-gated-content > input'); if (!namZapGated.val() || true) { namZapGated.val(namGatedContentPrefix + ' ' + namDocURL); } // SimplyStatic fix 4: populate page title, voided after staticization let namPageTitleId = $('.forminator-row.nam-page-title > input'); if (!namPageTitleId.val()) { let namDocTitle = document.title; let lastDashIndex = namDocTitle.lastIndexOf("–"); // encoded char should be – let trimmedStr = (lastDashIndex > 0) ? namDocTitle.substring(0, lastDashIndex).trim() : namDocTitle.trim(); $(namPageTitleId).val(trimmedStr); } } }); } }); }); }