Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
how can I add a condition before deleting a field. I have added a filed collection which includes two fields subject and cost and while removing this field I want to check if subject is in use with my other tables then remove it else gives a message you can not remove. I want to add my custom condition before a user deletes a field. How can I achieve this. Please help me in this.
Comments
Comment #1
jmuzz CreditAttribution: jmuzz commentedComment #2
jmuzz CreditAttribution: jmuzz commentedYou can implement hook_entity_info_alter to set up a custom access callback for field collection items.