【发布时间】:2021-03-01 08:11:25
【问题描述】:
我的功能:
function _custom_get_ublox_communication_checkbox_form_element() {
return array(
'#type' => 'checkboxes',
'#title' => t('Communications'),
'#options' => array(
1 => t('I consent to retaining my personal data for the purposes of receiving personalized marketing materials, offers, invitations to webinars and other similar events. To learn more, read our <a )),
),
'#required' => TRUE,
);
}
此复选框是必需的,因为有选项 '#required' => TRUE,但在删除所需选项后,它甚至不会从字段中删除所需的 (*) 检查。
【问题讨论】:
标签: checkbox webforms drupal-7 required-field