mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-10-04 04:21:40 +00:00
only include checked checkbox fields in prechat form submission
This commit is contained in:
@@ -314,7 +314,7 @@ const submitForm = handleSubmit((values) => {
|
||||
const field = sortedFields.value.find((f) => f.key === key)
|
||||
const value = values[key]
|
||||
if (
|
||||
field?.type === 'checkbox' ||
|
||||
(field?.type === 'checkbox' && value === true) ||
|
||||
(value !== undefined && value !== null && String(value).trim() !== '')
|
||||
) {
|
||||
filteredValues[key] = value
|
||||
|
||||
Reference in New Issue
Block a user