diff --git a/src/includes/class/class.LSattr_html.php b/src/includes/class/class.LSattr_html.php index fba6eb06..494335d7 100644 --- a/src/includes/class/class.LSattr_html.php +++ b/src/includes/class/class.LSattr_html.php @@ -118,7 +118,7 @@ class LSattr_html extends LSlog_staticLoggerClass { * @retval array The values to be displayed in the LSform **/ public function getFormVal($data) { - return $this -> attribute -> getDisplayValue(); + return $this -> attribute -> getDisplayValue($data); } /** diff --git a/src/includes/class/class.LSattribute.php b/src/includes/class/class.LSattribute.php index 0aa7b2eb..1e2f8db4 100644 --- a/src/includes/class/class.LSattribute.php +++ b/src/includes/class/class.LSattribute.php @@ -410,14 +410,19 @@ class LSattribute extends LSlog_staticLoggerClass { } /** - * Retourne la valeur a afficher dans le formulaire + * Return the form display value + * + * @param[in] $data mixed Custom attribute data (optional, default: current attribute data) * * @author Benjamin Renard * - * @retval string La valeur a afficher dans le formulaire. + * @retval string The form display value */ - public function getFormVal() { - return ensureIsArray($this -> html -> getFormVal($this -> data)); + public function getFormVal($data=null) { + if (is_null($data)) { + $data = ($this -> isUpdate()?$this -> updateData:$this -> data); + } + return ensureIsArray($this -> html -> getFormVal($data)); } /**