Skip to content

System Advanced: CustomFieldAPI

Elan Ruusamäe edited this page Oct 24, 2015 · 1 revision

CustomFieldAPI

Overview

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.

Examples

Default Value

    /**
     * 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';
        }
    }
  • a bigger project
    • first subtask #1234
    • follow up subtask #4321
    • final subtask cc @mention
  • a separate task
Clone this wiki locally