LSform_rule :: differentPassword : Add missing LSform :: getValue() function

This commit is contained in:
Benjamin Renard 2019-07-01 18:19:58 +02:00
parent 921d73e519
commit b6f0605dac

View file

@ -615,6 +615,23 @@ class LSform {
return $this -> elements[$element];
}
/**
* Return the values of an element
*
* If form is posted, retreive values from postData, otherwise
* retreive value from the element.
*
* @param[in] string $element The element name
*
* @retval mixed The element values
**/
public function getValue($element) {
if ($this -> isSubmit() && $this -> _postData) {
return $this -> _postData[$element];
}
return $this -> elements[$element] -> getValue();
}
/**
* Défini les valeurs des élements à partir des valeurs postées
*