diff --git a/administrator/components/com_contact/models/forms/fields/mail.xml b/administrator/components/com_contact/forms/fields/mail.xml similarity index 100% rename from administrator/components/com_contact/models/forms/fields/mail.xml rename to administrator/components/com_contact/forms/fields/mail.xml diff --git a/administrator/components/com_fields/Model/Field.php b/administrator/components/com_fields/Model/Field.php index 65d8b2b21a604..9fb3c8f2ce7c9 100644 --- a/administrator/components/com_fields/Model/Field.php +++ b/administrator/components/com_fields/Model/Field.php @@ -970,8 +970,14 @@ protected function preprocessForm(\JForm $form, $data, $group = 'content') $form->setFieldAttribute('group_id', 'context', $this->state->get('field.context')); $form->setFieldAttribute('rules', 'component', $component); - // Looking first in the component models/forms folder - $path = \JPath::clean(JPATH_ADMINISTRATOR . '/components/' . $component . '/models/forms/fields/' . $section . '.xml'); + // Looking in the component forms folder for a specific section forms file + $path = \JPath::clean(JPATH_ADMINISTRATOR . '/components/' . $component . '/forms/fields/' . $section . '.xml'); + + if (!file_exists($path)) + { + // Looking in the component models/forms folder for a specific section forms file + $path = \JPath::clean(JPATH_ADMINISTRATOR . '/components/' . $component . '/models/forms/fields/' . $section . '.xml'); + } if (file_exists($path)) {