Skip to main content
1 of 3
revagomes
  • 648
  • 3
  • 20

I had a similar question this days and I tried to see if the features module could help. Features worked to me.

You can create the field by the UI and then export a feature with the address field already created.

After that you can move the inc files for your custom module and add an include on your .module file:

include_once('[your_module].features.inc');

Then you will need to add the some lines on your .info from the info file of the exported feature.

Your info file will need something like this:

dependencies[] = "features"    
dependencies[] = "text"
    
features[field][] = "node-article-field_address"

This question may help you too.

Develop a module that adds a new content type with custom fields

revagomes
  • 648
  • 3
  • 20