Location: site_wide_footer
JetFormBuilder – Redirect after page submit
document.addEventListener(‘DOMContentLoaded’, function() { // Replace ‘your-form-class’ with the actual class of your JetFormBuilder form const forms = document.querySelectorAll(‘.jet-form-builder’); forms.forEach(function(form) { form.addEventListener(‘submit’, function(event) { // Set a flag in local storage to indicate that the form was submitted localStorage.setItem(‘formSubmitted’, ‘true’); });…Continue reading
Jetformbuilder – Parse Repeater on Review Page
jQuery(() => { const { addFilter, addAction } = JetPlugins.hooks; const { Filter } = JetFormBuilderAbstract; function RepeaterFilter() { Filter.call(this); this.getSlug = function () { return ‘repeaterTemplate’; }; /** * @param value {ObservableRow[]} */ this.apply = function (value) { const…Continue reading
JetFormBuilder – Submit Loader
document.addEventListener(‘DOMContentLoaded’, function() { var form = document.querySelector(‘.jet-form-builder’); if (form) { form.addEventListener(‘submit’, function(event) { var loader = document.getElementById(‘formLoader’); if (loader) { loader.style.display = ‘block’; } }); document.addEventListener(‘jet-form-builder/ajax/success’, function(event) { var loader = document.getElementById(‘formLoader’); if (loader) { loader.style.display = ‘none’; } });…Continue reading
JetFormBuilder – Masks Number Input Field
document.addEventListener(‘DOMContentLoaded’, function() { function formatCurrency(input) { var number = parseFloat(input.replace(/,/g, ”)); if (!isNaN(number)) { return number.toLocaleString(‘en-US’, { style: ‘currency’, currency: ‘USD’, minimumFractionDigits: 0, maximumFractionDigits: 0 }); } else { alert(‘Please enter a valid number.’); return ”; } } function handleBlur(event)…Continue reading
Floating Social Media Icons (copy)
// Define social media links $facebook_link = ‘https://facebook.com/fb’; $twitter_link = ‘https://youtube.com/@yt’; $instagram_link = ‘https://instagram.com/ig’; echo ‘ .floating-social-icons { position: fixed; top: 50%; left: 0; transform: translateY(-50%); z-index: 1000; } .floating-social-icons a { display: block; margin: 5px 0; width: 40px; height:…Continue reading
JS [Paid Member Subscriptions & Profile Builder]: Adjust Position of Country Input Field and Pre-Select Country on Billing Form
// This code snippet is intended to added the style class to country that will position it under the state input. // This code also pre-selects the United States as the country in the dropdown and disables the State field…Continue reading
JS [Paid Member Subscriptions & Profile Builder]: Adjust Position of Country Input Field and Pre-Select Country on Billing Form
// This code snippet is intended to added the style class to country that will position it under the state input. // This code also pre-selects the United States as the country in the dropdown and disables the State field…Continue reading
Floating Social Media Icons
// Define social media links $facebook_link = ‘https://facebook.com/yourprofile’; $twitter_link = ‘https://twitter.com/yourprofile’; $instagram_link = ‘https://instagram.com/yourprofile’; $linkedin_link = ‘https://linkedin.com/in/yourprofile’; echo ‘ ‘;Continue reading
Hide Footer’s Social Links for non-logged in users
[mbr_not_logged_in] [/mbr_not_logged_in]Continue reading