I am adding field inside module.install file to specified entity. I want to hide this field from display. How can I do that?
1 Answer
Anyway found solution, example of field instance:
field_create_instance(array(
'field_name' => FIELD_GALLERY_VIEW_FIELD_NAME,
'entity_type' => 'node',
'bundle' => 'article',
'label' => t('Choose gallery View'),
'description' => t('Gallery view type for display gallery field collection'),
'widget' => array(
'type' => 'OPTIONS_SELECT',
'weight' => 0,
'settings' => array('size' => 50),
),
'display' => array(
'default' => array(
'label' => 'hidden',
'settings' => array(),
'weight' => 1,
'type' => 'hidden'
),
'teaser' => array(
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
),
),
'required' => TRUE,
));