Fix file value setting on form builder.
This commit is contained in:
1 parent
131dc0790f
commit
0e0bae2a0e
1 file changed
+6
-3
+6
-3
@@ -196,13 +196,16 @@ class FormBuilder {
|
||||
// in the model instance if one is set. Otherwise we will just use empty.
|
||||
$id = $this->getIdAttribute($name, $options);
|
||||
|
||||
$value = $this->getValueAttribute($name, $value);
|
||||
|
||||
$merge = compact('type', 'value', 'id');
|
||||
if ($type != 'file')
|
||||
{
|
||||
$value = $this->getValueAttribute($name, $value);
|
||||
}
|
||||
|
||||
// Once we have the type, value, and ID we can marge them into the rest of the
|
||||
// attributes array so we can convert them into their HTML attribute format
|
||||
// when creating the HTML element. Then, we will return the entire input.
|
||||
$merge = compact('type', 'value', 'id');
|
||||
|
||||
$options = array_merge($options, $merge);
|
||||
|
||||
return '<input'.$this->html->attributes($options).'>';
|
||||
|
||||
Reference in new issue
Block a user