如何以编程方式将此选项设置为“true”?
答案 0 :(得分:0)
$field_instance = field_info_instance('entity_type', 'field_name', 'bundle_name');
$field_instance['widget']['settings']['display_label'] = '1';
$field_instance['widget']['active'] = 1;
field_update_instance($field_instance);