我有一个名为field_event_location的字段,该字段有5个不同的位置值。这些设置为复选框(小部件)。
当管理员选择位置时,这些都被附加在一起(连接),没有空格或逗号,使阅读困难。
字段类型为term reference。
我想看看是否有其他的方法来保持这个(它只需要轻微的样式)。
有什么建议吗?我需要自定义模块吗?
下面是一个来自Pro Drupal开发书的例子:
$options = array(
'poison' => t('Sprays deadly poison'),
'metal' => t('Can bite/claw through metal'),
'deadly' => t('Killed previous owner')
);
$form['danger'] = array(
'#title' => t('Special conditions'),
'#type' => 'checkboxes',
'#description' => (t('Please note if any of these conditions apply to your pet')),
'#options' => $options,
'#weight' => 25
);
这将呈现一个字段集,其中包含标题、选项垂直堆叠和下面的描述。