mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 09:59:06 +01:00
LSform // dataEntryForm : set default value of displayed elements
This commit is contained in:
parent
2d80c4a852
commit
9b9324b120
1 changed files with 11 additions and 0 deletions
|
@ -652,6 +652,17 @@ class LSform {
|
|||
}
|
||||
$this -> dataEntryForm = $dataEntryForm;
|
||||
$this -> dataEntryFormConfig = $config;
|
||||
|
||||
// Set default value of displayed elements
|
||||
if(is_array($config['defaultValues'])) {
|
||||
foreach($config['displayedElements'] as $el) {
|
||||
if (isset($config['defaultValues'][$el])) {
|
||||
if (isset($this -> elements[$el])) {
|
||||
$this -> elements[$el] -> setValueFromPostData($config['defaultValues'][$el]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
LSerror :: addErrorCode('LSform_07',$dataEntryForm);
|
||||
|
|
Loading…
Reference in a new issue