form: select field : allow the provided value to be an integer and work correctely in comparison with the string defaults values
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4005 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
4
form.php
4
form.php
@@ -790,6 +790,10 @@ class formfield
|
|||||||
is_string ($this->values) &&
|
is_string ($this->values) &&
|
||||||
$this->values == $key)
|
$this->values == $key)
|
||||||
$res .= " selected='selected'";
|
$res .= " selected='selected'";
|
||||||
|
elseif (isset ($this->values) &&
|
||||||
|
is_integer ($this->values) &&
|
||||||
|
$this->values == $key)
|
||||||
|
$res .= " selected='selected'";
|
||||||
elseif (isset ($this->values) &&
|
elseif (isset ($this->values) &&
|
||||||
is_array ($this->values) &&
|
is_array ($this->values) &&
|
||||||
in_array ($key, $this->values))
|
in_array ($key, $this->values))
|
||||||
|
|||||||
Reference in New Issue
Block a user