joomla 3.9.1
create new field and set "Show on" only in administrator
Go to news category - field showed :(
Phrase "show_on" gives only XML + 1 PHP file.
In administrator/components/com_fields/helpers/fields.php
file we have function displayFieldOnForm()
but this function not called when page rendering
and parent function onCustomFieldsPrepareDom()
in file administrator/components/com_fields/libraries/fieldsplugin.php
not called too
//sorry. My English is not very good
Labels |
Added:
?
|
solution:
add to function public function onCustomFieldsPrepareField($context, $item, $field)
in file administrator/components/com_fields/libraries/fieldsplugin.php
code:
// Detect if the field is configured to be displayed on the form
if (!FieldsHelper::displayFieldOnForm($field))
{
return null;
}
after that all works fine
Status | New | ⇒ | Information Required |
@HLeithner can you please comment?
Category | ⇒ | com_fields |
no
Closed_Date | 2019-03-28 17:29:46 | ⇒ | 2019-03-28 17:29:47 |
Closed_By | Quy | ⇒ | joomla-cms-bot |
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-03-28 17:29:46 |
Closed_By | ⇒ | Quy |
Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/23246