Skip to content

Commit d9a5fa6

Browse files
committed
fix: issue with value overwrites
1 parent 0783356 commit d9a5fa6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Builders/FieldBuilder.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ public function makeInput($type, $name, $value, $options = [])
6969
$value = $value->format($options['format'] ?? 'Y-m-d');
7070
}
7171

72-
if (isset($options['value']) && is_null($value)) {
72+
// If a value is set in attributes, it takes precedence (overwrites the default value)
73+
if (isset($options['value']) && ! is_null($options['value'])) {
7374
$value = $options['value'];
7475
unset($options['value']);
7576
}

0 commit comments

Comments
 (0)