diff --git a/include/class.forms.php b/include/class.forms.php index 59bd50d38d79c8cd286c180cb15fbbda565ac1cb..389f74e48e566da9c591fd2e9453a28c3a92a35d 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -540,15 +540,19 @@ class FormField { static $more_types = array(); static $uid = null; + function _uid() { + return ++self::$uid; + } + function __construct($options=array()) { $this->ht = array_merge($this->ht, $options); if (!isset($this->ht['id'])) - $this->ht['id'] = self::$uid++; + $this->ht['id'] = self::_uid(); } function __clone() { $this->_widget = null; - $this->ht['id'] = self::$uid++; + $this->ht['id'] = self::_uid(); } static function addFieldTypes($group, $callable) {