Drupal: Hidden fields in programaticly defined entities

It can be useful to define custom entities programatically for streamlined CRUD webapps using Drupal. One nice thing about doing it this way is that you can keep all your entity definitions in the code, so deployment is easier - no clicking around on the various environments to keep things synced or akward db sync scripts. Sometimes a custom entity needs to have a hidden field that should not be exposed in the user-facing create/edit form....

June 13, 2024 · 2 min · 225 words · Ryan Dorward