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
This commit is contained in:
Eric 2024-04-18 17:04:30 -05:00 committed by GitHub
parent 63d91526d2
commit b52fe302c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 = {};