Skip to content

Partial rendering of RadioList is very strict to default value #76

Description

@janedbal

This form definition

$form->addRadioList('test', 'Test', [
    '1' => "one",
    '2' => "two",    
]);
$form->setDefaults(['test' => '1']);

with following rendering

{foreach ['1', '2'] as $key}
    {input test:$key}
    {label test:$key /}
{/foreach}

will not check the default radiolist value due to strict comparison here. Maybe the $key might be fixed by the same trick as used here. What do you think?


Example is quite artificial, but when the arrays are generated somewhere, it is not so obvious what is happening...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions