Don't fetch old input for unnamed fields.
This is the proper fix for the underlying problem of #638.
This commit is contained in:
1 parent
fc025c0876
commit
560af380fc
1 file changed
+3
-1
+3
-1
@@ -658,7 +658,7 @@ class FormBuilder {
|
|||||||
/**
|
/**
|
||||||
* Get the value that should be assigned to the field.
|
* Get the value that should be assigned to the field.
|
||||||
*
|
*
|
||||||
* This returns either old input for this field, the
|
* If a name is given, this returns either old input for this field, the
|
||||||
* value passed to this method or the equally-named attribute of the
|
* value passed to this method or the equally-named attribute of the
|
||||||
* current model instance (in this order of precedence).
|
* current model instance (in this order of precedence).
|
||||||
*
|
*
|
||||||
@@ -668,6 +668,8 @@ class FormBuilder {
|
|||||||
*/
|
*/
|
||||||
protected function getValueAttribute($name, $value)
|
protected function getValueAttribute($name, $value)
|
||||||
{
|
{
|
||||||
|
if (is_null($name)) return $value;
|
||||||
|
|
||||||
if (isset($this->session) and $this->session->hasOldInput($name))
|
if (isset($this->session) and $this->session->hasOldInput($name))
|
||||||
{
|
{
|
||||||
return $this->session->getOldInput($name);
|
return $this->session->getOldInput($name);
|
||||||
|
|||||||
Reference in new issue
Block a user