【发布时间】:2011-12-22 10:07:30
【问题描述】:
我想在我的 D7 表单中添加一些复选框。出于某种原因,下面的 sn-p 不起作用。任何想法为什么或任何建议如何正确地做到这一点?
$options = array('A', 'B', 'C');
foreach ($themas as $thema) {
// Initialize array
$ra = array();
// Fill up the array with different keys
$key = $prefix.'_thema_'.$thema->tid.'_fiche';
$ra[$key]['#type'] = 'checkboxes';
$ra[$key]['#name'] = $prefix.'_thema_'.$thema->tid.'_opties';
$ra[$key]['#options'] = $options;
}
【问题讨论】:
标签: php forms drupal checkbox drupal-7