<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mwiki.costasano.club/index.php?action=history&amp;feed=atom&amp;title=ICT%3ADrupal_Standard%3A_Field_naming_Convention</id>
	<title>ICT:Drupal Standard: Field naming Convention - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mwiki.costasano.club/index.php?action=history&amp;feed=atom&amp;title=ICT%3ADrupal_Standard%3A_Field_naming_Convention"/>
	<link rel="alternate" type="text/html" href="https://mwiki.costasano.club/index.php?title=ICT:Drupal_Standard:_Field_naming_Convention&amp;action=history"/>
	<updated>2026-04-17T19:46:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://mwiki.costasano.club/index.php?title=ICT:Drupal_Standard:_Field_naming_Convention&amp;diff=1551&amp;oldid=prev</id>
		<title>Mngr: Created page with &quot;== ICT Standard: Field Naming Conventions ==  To ensure the &#039;&#039;&#039;Heritage Tweaks&#039;&#039;&#039; module functions correctly and the database remains organized, all new fields must follow this dual-naming convention.  === 1. The Prefix Rule (Namespace) === All field machine names must start with a two-character code representing the &#039;&#039;&#039;Content Type&#039;&#039;&#039;. * &#039;&#039;&#039;Pattern:&#039;&#039;&#039; &lt;code&gt;field_xx_fieldname&lt;/code&gt; (where &lt;code&gt;xx&lt;/code&gt; is the unique prefix). * &#039;&#039;&#039;Example:&#039;&#039;&#039; &lt;code&gt;field_sa_name&lt;/cod...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mwiki.costasano.club/index.php?title=ICT:Drupal_Standard:_Field_naming_Convention&amp;diff=1551&amp;oldid=prev"/>
		<updated>2026-03-22T15:59:36Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== ICT Standard: Field Naming Conventions ==  To ensure the &amp;#039;&amp;#039;&amp;#039;Heritage Tweaks&amp;#039;&amp;#039;&amp;#039; module functions correctly and the database remains organized, all new fields must follow this dual-naming convention.  === 1. The Prefix Rule (Namespace) === All field machine names must start with a two-character code representing the &amp;#039;&amp;#039;&amp;#039;Content Type&amp;#039;&amp;#039;&amp;#039;. * &amp;#039;&amp;#039;&amp;#039;Pattern:&amp;#039;&amp;#039;&amp;#039; &amp;lt;code&amp;gt;field_xx_fieldname&amp;lt;/code&amp;gt; (where &amp;lt;code&amp;gt;xx&amp;lt;/code&amp;gt; is the unique prefix). * &amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039; &amp;lt;code&amp;gt;field_sa_name&amp;lt;/cod...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== ICT Standard: Field Naming Conventions ==&lt;br /&gt;
&lt;br /&gt;
To ensure the &amp;#039;&amp;#039;&amp;#039;Heritage Tweaks&amp;#039;&amp;#039;&amp;#039; module functions correctly and the database remains organized, all new fields must follow this dual-naming convention.&lt;br /&gt;
&lt;br /&gt;
=== 1. The Prefix Rule (Namespace) ===&lt;br /&gt;
All field machine names must start with a two-character code representing the &amp;#039;&amp;#039;&amp;#039;Content Type&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Pattern:&amp;#039;&amp;#039;&amp;#039; &amp;lt;code&amp;gt;field_xx_fieldname&amp;lt;/code&amp;gt; (where &amp;lt;code&amp;gt;xx&amp;lt;/code&amp;gt; is the unique prefix).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039; &amp;lt;code&amp;gt;field_sa_name&amp;lt;/code&amp;gt; for Sanatoria, &amp;lt;code&amp;gt;field_pa_surname&amp;lt;/code&amp;gt; for Patients.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Benefit:&amp;#039;&amp;#039;&amp;#039; Prevents naming collisions and makes Configuration Management (CM) easier to filter.&lt;br /&gt;
&lt;br /&gt;
=== 2. The Suffix Rule (Functional Hook) ===&lt;br /&gt;
Any text field intended to store a historical date in &amp;lt;code&amp;gt;dd/mm/yyyy&amp;lt;/code&amp;gt; format must end with the suffix &amp;lt;code&amp;gt;_day&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Pattern:&amp;#039;&amp;#039;&amp;#039; &amp;lt;code&amp;gt;field_xx_customname_day&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&amp;#039; &amp;lt;code&amp;gt;field_sa_foundation_day&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Logic:&amp;#039;&amp;#039;&amp;#039; The PHP function &amp;lt;code&amp;gt;heritage_tweaks_date_validate&amp;lt;/code&amp;gt; automatically scans for this suffix to apply:&lt;br /&gt;
** Automatic UI Placeholders (dd/mm/yyyy).&lt;br /&gt;
** RegEx format validation.&lt;br /&gt;
** Calendar sanity checks (Leap years/invalid months).&lt;br /&gt;
&lt;br /&gt;
=== Summary Table for Successors ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Purpose !! Required Suffix !! Resulting Behavior&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Standard Text || (None) || Normal Drupal behavior&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| Historical Date || &amp;#039;&amp;#039;&amp;#039;_day&amp;#039;&amp;#039;&amp;#039; || Text-entry with DD/MM/YYYY validation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:ICT Standards]] [[Category:Database Design]]&lt;/div&gt;</summary>
		<author><name>Mngr</name></author>
	</entry>
</feed>