diff --git a/gulliver/js/grid/core/grid.js b/gulliver/js/grid/core/grid.js index 24e3a2007..2dfe52872 100755 --- a/gulliver/js/grid/core/grid.js +++ b/gulliver/js/grid/core/grid.js @@ -685,6 +685,14 @@ var G_Grid = function(oForm, sGridName){ if (this.onaddrow) { this.onaddrow(currentRow); } + + newInputs = oNewRow.getElementsByTagName('input'); + for (var i = 0; i <= newInputs.length; i++) { + if (typeof(newInputs[i]) != 'undefined' && newInputs[i].type != 'hidden') { + newInputs[i].focus(); + break; + } + } }; this.deleteGridRow = function (sRow, bWithoutConfirm) diff --git a/gulliver/system/class.xmlform.php b/gulliver/system/class.xmlform.php index a5586cc96..c361c5d86 100755 --- a/gulliver/system/class.xmlform.php +++ b/gulliver/system/class.xmlform.php @@ -4781,7 +4781,9 @@ class xmlformTemplate extends Smarty function getFields(&$form, $therow = -1) { $result = array (); + foreach ( $form->fields as $k => $v ) { + if ($form->mode != '') { #@ last modification: erik $v->mode = $form->mode; #@ } #@ @@ -4789,7 +4791,20 @@ class xmlformTemplate extends Smarty $value = (isset ( $form->values [$k] )) ? $form->values [$k] : NULL; $result [$k] = G::replaceDataField ( $form->fields [$k]->label, $form->values ); if ($form->type == 'xmlform') { - $result[$k] = ''; + if ($v->type == 'checkgroup' || $v->type == 'radiogroup') { + $firstValueOptions = ''; + foreach ($v->options as $indexOption => $valueOptions) { + $firstValueOptions = $indexOption; + break; + } + if ($firstValueOptions != '') { + $result[$k] = ''; + } else { + $result[$k] = ''; + } + } else { + $result[$k] = ''; + } } if (! is_array ( $value )) { if ($form->type == 'grid') {