Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
问题是锂根据 id 设置名称。 如果名称不同,则无法对单选组进行分组。
此外,由于字段上的 ID 不同而导致名称不同,因此尝试嵌套嵌套组将是一个问题,因此使用 form->radio 将无济于事。
FWIW,他们最近修复了这个问题[1]。检查测试以了解如何使用它
$this->form->radio('foo', array('value' => 'nose')); $this->form->radio('foo', array('checked' => true, 'value' => '1'));
[1] https://github.com/UnionOfRAD/lithium/pull/308