From 6769da6e1047e92f5b4bfa79c54cd4250ee6bc04 Mon Sep 17 00:00:00 2001 From: Chirag Chhatrala <60499540+chiragchhatrala@users.noreply.github.com> Date: Thu, 5 Sep 2024 21:29:19 +0530 Subject: [PATCH] fix signature url issue (#560) --- api/app/Service/Forms/FormSubmissionFormatter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/app/Service/Forms/FormSubmissionFormatter.php b/api/app/Service/Forms/FormSubmissionFormatter.php index 5b123c85..95f4356b 100644 --- a/api/app/Service/Forms/FormSubmissionFormatter.php +++ b/api/app/Service/Forms/FormSubmissionFormatter.php @@ -158,7 +158,7 @@ class FormSubmissionFormatter } } elseif ($field['type'] == 'matrix' && is_array($data[$field['id']])) { $returnArray[$field['name']] = $this->getMatrixString($data[$field['id']]); - } elseif ($field['type'] == 'files') { + } elseif (in_array($field['type'], ['files', 'signature'])) { if ($this->outputStringsOnly) { $formId = $this->form->id; $returnArray[$field['name']] = implode( @@ -234,7 +234,7 @@ class FormSubmissionFormatter } } elseif ($field['type'] == 'matrix') { $field['value'] = str_replace(' | ', "\n", $this->getMatrixString($data[$field['id']])); - } elseif ($field['type'] == 'files') { + } elseif (in_array($field['type'], ['files', 'signature'])) { if ($this->outputStringsOnly) { $formId = $this->form->id; $field['value'] = implode(