How can I approach implementing the following in Drupal 7?
What I need to do is create a module which defines a new fieldable entity, called ‘Company’. I have a list of, let’s say, 20 fields that need to be filled out by each Company instance. These questions are predefined and some may contain custom validation.
At the moment, I’m at the point when I can add new fields to the Company entity. This works fine at the moment. My issue is that I need all these fields to be there as soon the module is installed, so adding them via the interface isn’t an option.
I was wondering how can I approach this? I’d assume it comes down being able to do what can be done using the ‘Manage Fields’ UI programmatically.