I tried to create some fields and field instance programmatically in .install file.
And I need to set a specail field instance with display none.
I have google, but got nothing.
Does anyone have a solution ?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityI tried to create some fields and field instance programmatically in .install file.
And I need to set a specail field instance with display none.
I have google, but got nothing.
Does anyone have a solution ?
your question is not very clear.
What do you mean "display none"?
files[]=mymodule.css
.field-myfield {display:none;}
.EDIT
I think you probably want to look at Field Permissions module.
The Field Permissions module allows site administrators to set field-level permissions to edit, view and create fields on any entity.
$field_config
and $field_instance_config
in mymodule.features.field.inc
– tenken
Jul 10 '13 at 6:20