diff --git a/app/javascript/widget/components/ChatFooter.vue b/app/javascript/widget/components/ChatFooter.vue index 7ed33acbd..48279c5ba 100755 --- a/app/javascript/widget/components/ChatFooter.vue +++ b/app/javascript/widget/components/ChatFooter.vue @@ -95,12 +95,7 @@ export default { startNewConversation() { this.clearConversations(); this.clearConversationAttributes(); - - // To create a new conversation, we are redirecting - // the user to pre-chat with contact fields disabled - // Pass disableContactFields params to the route - // This would disable the contact fields in the pre-chat form - this.replaceRoute('prechat-form', { disableContactFields: true }); + this.replaceRoute('prechat-form'); }, async sendTranscript() { const { email } = this.currentUser; diff --git a/app/javascript/widget/components/PreChat/Form.vue b/app/javascript/widget/components/PreChat/Form.vue index 92800dfc9..4f78d07f0 100644 --- a/app/javascript/widget/components/PreChat/Form.vue +++ b/app/javascript/widget/components/PreChat/Form.vue @@ -74,10 +74,6 @@ export default { type: Object, default: () => {}, }, - disableContactFields: { - type: Boolean, - default: false, - }, }, data() { return { @@ -114,7 +110,7 @@ export default { return this.options.preChatMessage; }, preChatFields() { - return this.disableContactFields ? [] : this.options.preChatFields; + return this.options?.preChatFields || []; }, filteredPreChatFields() { const isUserEmailAvailable = !!this.currentUser.email; diff --git a/app/javascript/widget/views/PreChatForm.vue b/app/javascript/widget/views/PreChatForm.vue index a3986b07a..ec23db8c5 100644 --- a/app/javascript/widget/views/PreChatForm.vue +++ b/app/javascript/widget/views/PreChatForm.vue @@ -1,10 +1,6 @@