As mentioned in http://drupal.org/node/746214, there is currently no documentation regarding correct naming convention for fields defined by modules.
I believe the convention should be modulename_fieldname, since this prevents name collisions and is the standard adopted for function names, but this doesn't appear to be stated anywhere.

If the correct standard could be confirmed, it would be good to include in the field_name description listed on http://api.drupal.org/api/group/field_structs/7

Thanks.

Comments

jhodgdon’s picture

Project: Documentation » Drupal core
Version: » 7.x-dev
Component: New documentation » documentation
Issue tags: +Coding standards

Moving queue and tagging

sun’s picture

Component: documentation » field system

Temporarily moving to field system component, in the hope that yched and/or bjaspan chime in.

jhodgdon’s picture

Project: Drupal core » Drupal Technical Working Group
Version: 7.x-dev »
Component: field system » Documentation
Issue summary: View changes

Coding standards changes are now part of the TWG

tizzo’s picture

Moving this issue to the Coding Standards queue per the new workflow defined in #2428153: Create and document a process for updating coding standards.

This seems like it would be an easy one to ratify and close out if we can get a couple of +1's, seems like a good idea.

tizzo’s picture

Project: Drupal Technical Working Group » Coding Standards
quietone’s picture

Status: Active » Closed (outdated)

Unfortunately, this issue hasn't had any work in the last 8 years. And Drupal 7 is scheduled for end of life is January 5, 2025. While that is more that 1 year away the focus for Drupal 7 is not coding standard changes or implementation. Therefor I am closing this as outdated.

End of life announcement and changes to Drupal 7 support - PSA-2023-06-07