BUG 7022 adicionar un campo al dynaform aparece un "Notice" SOLVED

This commit is contained in:
Erik Amaru Ortiz
2011-06-03 11:23:05 -04:00
parent ab6abc2f0b
commit dea8c861a8

View File

@@ -4177,7 +4177,9 @@ class XmlForm
if (isset ( $xmlNode [$k]->attributes ['required'] )) {
// the fields or xml nodes with a required attribute are put in an array that is passed to the view file
if ($xmlNode [$k]->attributes ['required'] == 1 && $xmlNode [$k]->attributes['mode'] != 'view' && $this->mode == 'edit')
$isEditMode = isset($xmlNode[$k]->attributes['mode']) && $xmlNode[$k]->attributes['mode'] == 'view' ? false: true;
if ($xmlNode [$k]->attributes ['required'] == 1 && $isEditMode && $this->mode != 'view')
$this->requiredFields [] = array ('name' => $field->name, 'type' => $xmlNode [$k]->attributes ['type'], 'label' => trim ( $field->label ) );
}