Skip to content

Commit 593f7d2

Browse files
authored
Merge pull request #22 from Merkeleon/master-old-value-form-fix
fix bug when multiple form on page
2 parents 96c36a2 + 2dc60d6 commit 593f7d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Form/Element.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct($name, $validators = '', Form $form = null)
4141
{
4242
$oldValue = request()->old($this->name, false);
4343
}
44-
$this->hasOldValue = $oldValue !== false;
44+
$this->hasOldValue = $isFormSubmitted && $oldValue !== false;
4545
$this->error = null;
4646
$errors = session()->get('errors');
4747

0 commit comments

Comments
 (0)