Hi there,
I'm trying to extend some of the field types in the UserForms module, to add some extra functions, and override some functions.
Eg - EditableLiteralFieldDecorator.php:
<?php
class EditableLiteralFieldDecorator extends DataExtension {
static $db = array (
"ExtraField" => "Varchar",
);
// override to use html editor
public function getFieldConfiguration() {
return new FieldList(
new HtmlEditorField("Fields[$this->ID][CustomSettings][Content]", "HTML", 4, 20, $this->getSetting('Content'))
);
}
}
and in the site _config.php file:
Object::add_extension('EditableLiteralField', 'EditableLiteralFieldDecorator');
Dev/build is creating the extra DB fields no problem, but my 'getFieldConfiguration' function isn't being called, the site is just using the 'getFieldConfiguration' function from the core file. Eg, I want my 'getFieldConfiguration' function override the core module 'getFieldConfiguration' function.