Skip to content

Commit 8944139

Browse files
committed
hotfix
1 parent b4a16af commit 8944139

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Gustiawan/FormBuilder/Form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public function checkBox(string $name, string $label, array $choices, array $opt
204204
*/
205205
public function upload(string $name, string $label, array $options=[])
206206
{
207-
$field = $this->parseField('upload', $name, $label, $options);
207+
$field = $this->parseField('file', $name, $label, $options);
208208
$this->hasUpload = true;
209209
$this->fields[] = $field;
210210
}

src/Gustiawan/FormBuilder/views/components/bootstrap/inputs.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@foreach($form->fields as $field)
22
<div class="form-group">
33
<label for="{{ $field['name'] }}" class="font-weight-bold">{!! $field['label'] !!}</label>
4-
@if( !in_array($field['type'], ["text", "date", "password", "number", "upload"]))
4+
@if( !in_array($field['type'], ["text", "date", "password", "number", "file"]))
55
@include('form-generator::components.bootstrap.fields.'.$field['type'], ["field" => $field])
66
@else
77
@include('form-generator::components.bootstrap.fields.input', ["field" => $field])

src/Gustiawan/FormBuilder/views/components/tailwind/inputs.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@foreach($form->fields as $field)
33
<div class="mb-4">
44
<label class="ml-1">{!! $field['label'] !!}</label>
5-
@if( !in_array($field['type'], ["text", "date", "password", "number", "upload"]))
5+
@if( !in_array($field['type'], ["text", "date", "password", "number", "file"]))
66
@include('form-generator::components.tailwind.fields.'.$field['type'], ["field" => $field])
77
@else
88
@include('form-generator::components.tailwind.fields.input', ["field" => $field])

0 commit comments

Comments
 (0)