jQuery(document).ready(function($) { console.log("Custom script loaded"); // Function to display the custom message function displayCustomMessage() { console.log("Displaying custom message"); var message = $('
Thank you, this referral has been submitted to Data Entry!
'); $('.gform_wrapper').prepend(message); message.fadeIn().delay(3000).fadeOut(function() { $(this).remove(); // Remove the message after fading out }); } // Check session storage for confirmation message flag if (sessionStorage.getItem('form_5_submitted') === 'true') { console.log("Form 5 submitted, showing custom message"); displayCustomMessage(); sessionStorage.removeItem('form_5_submitted'); } // Fetch user meta data via AJAX $.ajax({ url: ajax_object.ajax_url, method: 'POST', data: { action: 'get_user_meta', user_id: ajax_object.user_id }, success: function(response) { if (response.success && response.data.form_5_filled) { console.log("Showing saved info message"); if (!$('.gform_wrapper').find('.saved-info-message').length) { $('.gform_wrapper').prepend('
We have saved some information below to make it easier for you.
'); } } }, error: function() { console.error("Failed to fetch user meta data"); } }); // Form ID 5 submission $(document).on('gform_confirmation_loaded', function(event, formId) { if (formId == 5) { console.log("Form 5 confirmation loaded, setting flag and reloading page"); sessionStorage.setItem('form_5_submitted', 'true'); } }); // Ensure only one reload happens $(document).on('submit', '#gform_5', function() { sessionStorage.setItem('form_5_submitted', 'true'); }); }); Menus... | Homestyle Direct

Emma G has been busy getting menus mailed out.

menus

0
    Your Cart
    Your cart is empty