|
| Good morning
I've a problem with html_quick_form date element . I've the following error
message :
Notice: strtotime(): Called with empty time parameter in
/var/www/appli-box.com/htdocs/pear/PEAR/HTML/QuickForm/date.php on line 373
Could someone help me??
Here's my script :
function preGenerateForm(&$formBuilder)
{
$el = array();
$tabattributes['language']='fr';
$tabattributes['minYear']='2004';
$el['OPR'] = &HTML_QuickForm::createElement('date', 'OPR',
'OPR',$tabattributes);
$this->preDefElements = &$el;
}
function postGenerateForm(&$form)
{
if(isset($this->id)){
$tabOPR=array('d' => date('d', strtotime($this->OPR)), 'M' => date('m',
strtotime($this->OPR)), 'Y' => date('Y', strtotime($this->OPR)));
}else{
$tabOPR=array('d' => date('d'), 'M' => date('m'), 'Y' => date('Y'));
}
$constantValues['OPR'] = $tabOPR ;
$form->setDefaults($defaultsValues);
$form->setConstants($constantValues);
}
|
|