Signature block (img) (#39)

* Signature block (img)

* Singature input UI changes

* Style the signature input

Co-authored-by: Julien Nahum <jhumanj@MacBook-Pro-de-Julien.local>
This commit is contained in:
Chirag
2022-12-22 16:23:33 +05:30
committed by GitHub
parent 9936cb3389
commit 07f44ec048
10 changed files with 141 additions and 1 deletions

View File

@@ -124,6 +124,7 @@ class AnswerFormRequest extends FormRequest
switch ($property['type']) {
case 'text':
case 'phone_number':
case 'signature':
return ['string'];
case 'number':
return ['numeric'];

View File

@@ -41,7 +41,7 @@ class FormSubmissionResource extends JsonResource
$data = $this->data;
$formFields = collect($this->form->properties)->concat(collect($this->form->removed_properties));
$fileFields = $formFields->filter(function ($field) {
return $field['type'] == 'files';
return in_array($field['type'], ['files', 'signature']);
});
foreach ($fileFields as $field) {
if (isset($data[$field['id']]) && !empty($data[$field['id']])) {