forked from eventum/eventum
-
Notifications
You must be signed in to change notification settings - Fork 0
System Advanced: CustomFieldAPI
Elan Ruusamäe edited this page Oct 24, 2015
·
1 revision
The custom field API allows special functionality to be added to custom fields. Custom Field backends should be placed in include/custom_field/ and named "class.name.php". Inside the file the class should be named "name_Custom_Field_Backend". Once the backend file is in place you need to specify the backend on the manage custom fields page.
This documentation page is a work in progress.
/**
* Custom field backend showing example default value
*
* @author Bryan Alsdorf <[email protected]>
*/
class Default_Value_Custom_Field_Backend
{
function getDefaultValue($fld_id)
{
// your logic here
return 'eventum is the best';
}
}