BUG 7022 adicionar un campo al dynaform aparece un "Notice" SOLVED
This commit is contained in:
@@ -4177,7 +4177,9 @@ class XmlForm
|
|||||||
|
|
||||||
if (isset ( $xmlNode [$k]->attributes ['required'] )) {
|
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
|
// 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 ) );
|
$this->requiredFields [] = array ('name' => $field->name, 'type' => $xmlNode [$k]->attributes ['type'], 'label' => trim ( $field->label ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user