contao/core — Issue #3873: save_callback on input field text acts strange
Author: davorgit
Created: 2012-01-29 18:14:34+00:00
State: open

// if you define like this:
$GLOBALS['TL_DCA']['tl_member']['fields']['stop']['save_callback'][] = array('extended_class_tl_member', 'callbackfunction_to_execute');

//..than:

class extended_class_tl_member extends tl_member
{
public function callbackfunction_to_execute($val,DataContainer $dc)
{
// if this function is empty than allways sets empty to db
// or
$this->Database->execute("UPDATE tl_member SET stop='$val' WHERE id=".$dc->id);
// this saves ok but not in edit multiple if there are more than one fields to update ..try to save few times with different values
}
}