Articles tagged with fields

Show field on entity form programmatically

Posted on
How do you update entity display mode to show a newly created field by default? It is easy with configuration import, but what if you need to use hook_update_N?

How to name fields in Drupal

Posted on
The hardest thing in software development - is naming. Whether it is a variable, class name, or field naming in Drupal, it might be complicated. I'll write about my naming convention in Drupal that I will use daily basis and what are the benefits.

Choosing entity options for best performance in Drupal

Posted on
In Drupal, it is possible to create entity types with multiple options - with or without revisions, fieldable or not and these options have a different performance impact when dealing with functionalities that handle a large number of entities in a single process, so you would want it to be as fast as possible.