Hi guys,
I'm trying to use custom form for webchat. But no luck.
I'm using the following code:
[code]window._genesys.widgets = {
main: {
debug: true,
theme: "dark",
lang: "en",
mobileMode: 'auto',
mobileModeBreakpoint: 767,
downloadGoogleFont: 'false'
},
webchat: {
dataURL: "url_here",
apikey: "",
userData: {},
emojis: false,
uploadsEnabled: false,
autoInvite: {
enabled: false,
timeToInviteSeconds: 5,
inviteTimeoutSeconds: 30
},
chatButton: {
enabled: true,
openDelay: 1000,
effectDuration: 300,
hideDuringInvite: true,
template: '<div>LIVE CHAT</div>'
},
form: {
formJSON: {
wrapper: "<table></table>",
inputs: [{
id: "cx_webchat_form_firstname",
name: "firstname",
maxlength: "100",
placeholder: "My placeholder",
label: "my label",
validateWhileTyping: true, // default is false
},
{
id: "cx_webchat_form_lastname",
name: "lastname",
maxlength: "100",
placeholder: "@i18n:webchat.ChatFormPlaceholderLastName",
label: "@i18n:webchat.ChatFormLastName"
},
{
id: "cx_webchat_form_email",
name: "email",
maxlength: "100",
placeholder: "@i18n:webchat.ChatFormPlaceholderEmail",
label: "@i18n:webchat.ChatFormEmail",
validateWhileTyping: true, // default is false
},
{
id: "cx_webchat_form_subject",
name: "subject",
maxlength: "100",
placeholder: "@i18n:webchat.ChatFormPlaceholderSubject",
label: "@i18n:webchat.ChatFormSubject"
}
]
}
}
}
};[/code]
any help or working example is much appreciated.
Thanks.