I want to extend the DataObject (EditableDateField) of a module that I use (UserDefinedForms). There I want to overwrite a certain method (getFormField). I was trying to extend with DataExtension. But it does not work.
Here the code...
config.php:
EditableDateField::add_extension("CustomEditableDateField");
CustomEditableDateField:
class CustomEditableDateField extends DataExtension {
public function getFormField() {
//test is function called
echo 'test';
exit();
}
}
Also I tried to use Object::useCustomClass in the config to replace the whole EditableDateField with my CustomClass, but also no success.
What is the best way to do that?
Many thanx, Florian
getFormFieldwhat are you trying to do? Might be another function that you can use and has aextendcallback? - colymba