hi,
I need to add a mandatory on my field idResultsType in class Action since description or result :
1) I have add mandatoryEfficiencyOnDone in table Type
2) I have add that in class Type :
public $mandatoryEfficiencyOnDone; public $_lib_mandatoryEfficiencyOnDoneStatus; "mandatoryEfficiencyOnDone"=>"nobr",
So i see in ActionType my new field mandatory :
But now, my checkbox efficiency has no effect in my field idResultsType in Action
After, i have add that in SqlElement.php but it changes nothing :
if (property_exists($objType, 'mandatoryEfficiencyOnDone') and $objType->mandatoryEfficiencyOnDone
and property_exists($this, 'idResultsType')
and property_exists($this, 'done')) {
if ($this->done and ! $this->idResultsType) {
$result.='
' . i18n('messageMandatory',array($this->getColCaption('idResultsType')));
}
}
Thx
The problem is in this condition :
if ($this->done and ! $this->idResultsType)
Because i think i copy that :
if ($this->done and ! $this->result)
And i have just change $this->result
Okay i found, should be added 'trim()':
if ($this->done and ! trim($this->idResultsType))
It works !

