feat: Custom fields in pre-chat form (#4135)

Fixes: #2744
This commit is contained in:
Muhsin Keloth
2022-03-14 15:06:56 +05:30
committed by GitHub
parent 578414d788
commit e730804b48
16 changed files with 328 additions and 137 deletions

View File

@@ -32,7 +32,8 @@ class Channel::WebWidget < ApplicationRecord
self.table_name = 'channel_web_widgets'
EDITABLE_ATTRS = [:website_url, :widget_color, :welcome_title, :welcome_tagline, :reply_time, :pre_chat_form_enabled,
:continuity_via_email, :hmac_mandatory,
{ pre_chat_form_options: [:pre_chat_message, :require_email] },
{ pre_chat_form_options: [:pre_chat_message, :require_email,
{ pre_chat_fields: [:label, :name, :enabled, :type, :enabled, :required] }] },
{ selected_feature_flags: [] }].freeze
validates :website_url, presence: true