Field instance drupal hosting

When we go to the path /admin/structure/types/manage/article/fields and use Add new field option or Add existing field option, does that create a field or create field instance or attach field instance? How to differentiate between them? So programmatically when to use field_create_field. field_create_instance and field_attach api?

In the field api documentation it only tells admin UI and never talks about the path where to create both fields and field instance. So its confusing. I dont even know if I even make sense.

Field instance drupal hosting And an instance is

asked Jan 21 '13 at 15:59

it is always better to use the same field instance if the purpose is or the function is going to be same. for example you have different content type with the same taxonomy vocab to be added in all. it would be better to add the same field to all the content type rather than create different fields to each content type. Internally this would decrease the number of tables build by drupal. and searching on the vocab would become better. - Mohammed Shameem Jan 21 '13 at 16:57

So fields that we see at path node/add/article are field instances (which are reused at several different entity types). And fields at path /admin/structure/types/manage/article/fields are fields. In database I don't see a field instance table but only field_data table which, I guess, we get when we first create a field at path /admin/structure/types/manage/article/fields using field_create_field. And an instance is then attached to a bundle (article in this case) that we see at path node/add/article. - Eugene Gerome Jan 21 '13 at 17:20

A field is the basic definition of a field itself. A field instance is an instance of that field, attached to an entity/bundle.

To check if the field, or instance exists, use

When you create a field through the UI, Drupal always creates a field instance on that entity/bundle.

If you're adding an existing field, the field data is cloned and a field instance is created on the new entity/bundle.

Lastly, field settings apply globally to that field, field instance settings can vary between entity bundles.

Watch this video!

Related articles

Tim millwood drupal hostingIts learning curve is notorious but Tim Millwood argues that Drupal is not that fearsome, and demonstrates how you can use it to build a job board Knowledge needed. Basic web development and...
Add new page in drupal hostingThis tutorial is going to show you how to add a new page and a new menu tab pointed to the page to your Drupal website . In order to do this: Log in to your Drupal backend interface; Click on...
Reference link drupal hostingPosted by tejaspmehta on August 18, 2011 at 6:25am I am using CCK + Views to create one application in D7. I have following cck. Category Sub Category (one field has node reference to Category)...
Multi sites drupal hostingIf you are running more than one Drupal site, you can simplify the management and can upgrade your sites by using the multi-site feature. Multi-site allows you to share a single Drupal...
Miglior hosting drupal themesWhat is Drupal? Drupal is an open source content management platform that can be downloaded and used free of charge. It consists of a core group of files that are standard on all installations,...