diff --git a/gulliver/system/class.xmlform.php b/gulliver/system/class.xmlform.php index f6596eebf..30cb6c120 100755 --- a/gulliver/system/class.xmlform.php +++ b/gulliver/system/class.xmlform.php @@ -2081,6 +2081,18 @@ class XmlForm_Field_Currency extends XmlForm_Field_SimpleText */ public function render ($value = null, $owner = null) { + if (($this->pmconnection != '') && ($this->pmfield != '') && $value == null) { + $value = $this->getPMTableValue( $owner ); + } else { + $this->executeSQL( $owner ); + if (isset( $this->sqlOption )) { + $firstElement = key( $this->sqlOption ); + } + if (isset( $firstElement )) { + $value = $firstElement; + } + } + if ($this->renderMode == '') { $this->renderMode = $this->mode; } @@ -2141,6 +2153,12 @@ class XmlForm_Field_Currency extends XmlForm_Field_SimpleText } foreach ($values as $v) { + $this->executeSQL( $owner, $r ); + $firstElement = key( $this->sqlOption ); + if (isset( $firstElement )) { + $v = $firstElement; + } + $html = ''; $currency = preg_replace( '/([_;#,.])/', '', $this->mask ); if (! $v) {