Closed JamesPoel closed 4 years ago
Example:
{{ bs()->text('profile[first_name]', $user->first_name) }}
If you submit a form containing the above, and there is a validation error, the value previously inputted into the form is not loaded back into the field.
Caused by ln 31 of OldFormInputProvider.php. return $this->request->old(field_name_to_id($key), $default);
return $this->request->old(field_name_to_id($key), $default);
field_name_to_id($key) translates to "profile_first_name", wheras it should be "profile.first_name".
field_name_to_id($key)
"profile_first_name"
"profile.first_name"
Changing the line to simply return $this->request->old($key, $default);, solves the issue.
return $this->request->old($key, $default);
Hi,
would you be able to submit a PR for a fix?
Done
Still not merged, causing a fair bit of problems :( Had to edit the file directly for now... ha
Example:
If you submit a form containing the above, and there is a validation error, the value previously inputted into the form is not loaded back into the field.
Caused by ln 31 of OldFormInputProvider.php.
return $this->request->old(field_name_to_id($key), $default);
field_name_to_id($key)
translates to"profile_first_name"
, wheras it should be"profile.first_name"
.Changing the line to simply
return $this->request->old($key, $default);
, solves the issue.