BUG 10885 Checkgroup submit problem SOLVED

- Fields duplicated in form view types hidden and checkbox.
- Was delete de name in field checkbox in form view.
This commit is contained in:
Marco Antonio Nina
2013-02-25 15:27:30 -04:00
parent ece76bc22a
commit 40f3b9d934

View File

@@ -3787,7 +3787,7 @@ class XmlForm_Field_CheckGroup extends XmlForm_Field
} elseif ($this->mode === 'view') {
$html = '';
foreach ($this->options as $optionName => $option) {
$html .= '<input class="FormCheck" id="form[' . $this->name . '][' . $optionName . ']" name="form[' . $this->name . '][]" type=\'checkbox\' value="' . $optionName . '"' . (in_array( $optionName, $value ) ? 'checked' : '') . ' disabled><span class="FormCheck"><label for="form[' . $this->name . '][' . $optionName . ']">' . $option . '</label></span></input><br>';
$html .= '<input class="FormCheck" id="form[' . $this->name . '][' . $optionName . ']" type=\'checkbox\' value="' . $optionName . '"' . (in_array( $optionName, $value ) ? 'checked' : '') . ' disabled><span class="FormCheck"><label for="form[' . $this->name . '][' . $optionName . ']">' . $option . '</label></span></input><br>';
$html .= '<input type="hidden" id="form[' . $this->name . '][' . $optionName . ']" name="form[' . $this->name . '][]" value="' . ((in_array( $optionName, $value )) ? $optionName : '') . '">';
}
return $html;