$jform = new JForm(); $jform->addFieldPath('/path/to/custom/fields/'); $field = $jform->getField('my_custom_field');In this example, we are creating a new JForm instance and specifying a custom field path using addFieldPath. Then we are retrieving a particular custom field named 'my_custom_field'. This code snippet could be from a Joomla! package library, as JForm is a core Joomla! class.