diff --git a/gulliver/system/class.xmlform.php b/gulliver/system/class.xmlform.php
index 9e56705df..9a5608e39 100755
--- a/gulliver/system/class.xmlform.php
+++ b/gulliver/system/class.xmlform.php
@@ -3240,10 +3240,13 @@ class XmlForm_Field_Submit extends XmlForm_Field
public function render ($value = null, $owner = null)
{
$onclick = G::replaceDataField( $this->onclick, $owner->values );
+ if ($onclick != '') {
+ $onclick = "this.disabled=true;" . $onclick;
+ }
if ($this->mode === 'edit') {
// if ($this->readOnly)
// return 'label .'\' disabled/>';
- return "style}\" class='module_app_button___gray {$this->className}' id=\"form[{$this->name}]\" name=\"form[{$this->name}]\" type='submit' value=\"{$this->label}\" " . (($this->onclick) ? 'onclick="' . htmlentities( $onclick, ENT_COMPAT, 'utf-8' ) . '"' : '') . " />";
+ return "style}\" class='module_app_button___gray {$this->className}' id=\"form[{$this->name}]\" name=\"form[{$this->name}]\" type='submit' value=\"{$this->label}\" " . (($this->onclick) ? 'onclick="' . htmlentities( $onclick, ENT_COMPAT, 'utf-8' ) . '"' : 'onclick="this.disabled=true;");\'') . " />";
} elseif ($this->mode === 'view') {
//return "style};display:none\" disabled='disabled' class='module_app_button___gray module_app_buttonDisabled___gray {$this->className}' id=\"form[{$this->name}]\" name=\"form[{$this->name}]\" type='submit' value=\"{$this->label}\" " . (($this->onclick) ? 'onclick="' . htmlentities ( $onclick, ENT_COMPAT, 'utf-8' ) . '"' : '') . " />";
//$sLinkNextStep = 'window.open("' . $owner->fields['__DYNAFORM_OPTIONS']->xmlMenu->values['NEXT_STEP'] . '", "_self");';