Skip to content

Commit

Permalink
Use session handle as fallback form handle
Browse files Browse the repository at this point in the history
  • Loading branch information
daun committed Oct 22, 2024
1 parent 5a5272c commit a0de4d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Tags/Concerns/RendersForms.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ protected function getRenderableField($field, $errorBag = 'default', $manipulate
->map->get('default')
->filter()->all();

$formHandle = $field->form()?->handle() ?? Str::slug($errorBag);
$data = array_merge($configDefaults, $field->toArray(), [
'id' => $this->generateFieldId($field->form()?->handle(), $field->handle()),
'id' => $this->generateFieldId($formHandle, $field->handle()),
'instructions' => $field->instructions(),
'error' => $errors->first($field->handle()) ?: null,
'default' => $field->value() ?? $field->defaultValue(),
Expand Down

0 comments on commit a0de4d0

Please sign in to comment.