Hello Davo,
My form is inside a module. So, finally, I decided to do this:
$this->_instance &&
$mymodule =$DB->get_record("mymodule", array("id"=>$this->_instance))) {
$mform->addElement('header', 'general', 'Editing');
} else {
$mform->addElement('header', 'general', 'Creating');
}
Best regards,
Iban Cardona.