Skip to content

Commit

Permalink
Fix persistency in datalist
Browse files Browse the repository at this point in the history
  • Loading branch information
bittrframework committed Jun 5, 2019
1 parent c91f3f0 commit 26ef193
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -733,14 +733,15 @@ private function makeAttr(array $attributes, bool $val = true): string
if (isset($this->post[$name]))
{
$value = $this->post[$name];
if ($attributes['type'] == 'radio')
$typed = isset($attributes['type']);
if ($typed && $attributes['type'] == 'radio')
{
if ($value == $attributes['value'])
{
$attributes['checked'] = 'checked';
}
}
elseif ($attributes['type'] == 'checkbox')
elseif ($typed && $attributes['type'] == 'checkbox')
{
if (is_array($value))
{
Expand Down

0 comments on commit 26ef193

Please sign in to comment.