You can easily configure Custom Fields in your global config, whether you want to use them straightforwardly in your theming, or do something specialized with them via a custom module.
In LiveWhale 3.0+, you also have the option to add custom fields from inside a module. There’s no functionality change here, it just lets you organize your code a little differently. This is handy if you want to keep your module code completely self-contained (i.e., “Add these fields and do these things with them”), which can help for moving code between dev and prod.
public function onCustomFields($buffer) { // when custom fields are initialized
// add one or more custom fields
$buffer['global'][]=[ // add a site-wide custom field
'header'=>'Test Field',
'name'=>'test_field',
'instruction'=>'',
'content_type'=>['events'],
'type'=>'textarea',
'is_required'=>false,
'place_after'=>'tags',
'wysiwyg'=>'limited'
];
$buffer[147][]=[ // add a custom field just to group 147
'header'=>'Test Field 2',
'name'=>'test_field_2',
'instruction'=>'',
'content_type'=>['events'],
'type'=>'textarea',
'is_required'=>false,
'place_after'=>'tags',
'wysiwyg'=>'limited'
];
return $buffer;
}