1
D7 폼에 체크 박스를 추가하고 싶습니다. 어떤 이유로 든 아래 스 니펫이 작동하지 않습니다. 어떤 아이디어가 왜 또는 어떤 충고를 적절히하는 방법?Drupal-form에 여러 개의 체크 박스 추가하기
$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;
}
사실 참으로 초기화 문제였습니다! '# options' 값은 매번 덮어 쓰기됩니다. 감사 – Michiel