From b52fe302c91b1f3333fa2835533169a43f563b4e Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 18 Apr 2024 17:04:30 -0500 Subject: [PATCH] Website: Update default /contact page form for users with no primaryBuyingSituation (#18413) Changes: - Updated the default /contact page form for users who have no primaryBuyingSituation --- website/assets/js/pages/contact.page.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/website/assets/js/pages/contact.page.js b/website/assets/js/pages/contact.page.js index ac8dbb19a0..b7d961a400 100644 --- a/website/assets/js/pages/contact.page.js +++ b/website/assets/js/pages/contact.page.js @@ -49,6 +49,9 @@ parasails.registerPage('contact', { beforeMount: function() { if(this.formToShow === 'contact'){ this.formToDisplay = this.formToShow; + } else if(!this.primaryBuyingSituation){ + // Default to contact form for users who have no primaryBuyingSituation set. + this.formToDisplay = 'contact'; } if(this.primaryBuyingSituation){ // If the user has a priamry buying situation set in their sesssion, pre-fill the form. // Note: this will be overriden if the user is logged in and has a primaryBuyingSituation set in the database. @@ -108,7 +111,7 @@ parasails.registerPage('contact', { }, clickSwitchForms: function(form) { - if(this.prefillFormDataFromUserRecord){ + if(this.me){ this.formData = _.clone(this.formDataToPrefillForLoggedInUsers); } else { this.formData = {};