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:
@@ -124,6 +124,7 @@ class AnswerFormRequest extends FormRequest
|
||||
switch ($property['type']) {
|
||||
case 'text':
|
||||
case 'phone_number':
|
||||
case 'signature':
|
||||
return ['string'];
|
||||
case 'number':
|
||||
return ['numeric'];
|
||||
|
||||
@@ -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']])) {
|
||||
|
||||
Reference in New Issue
Block a user