Hot answers tagged

3

Apparently, you need to use namespaces in your extension to override fields with the same type. This is because of the class lookup order: Namespaces added using addfieldprefix attribute or Joomla\CMS\Form\FormHelper::addFieldPrefix() in reverse order. Joomla\CMS\Form\Field namespace. J-prefixed autoloaded classes. J-prefixed classes in directories added ...


2

My question could be solved by the comments of mickmackusa and Sharky. I have finally extended the JFormFieldGroupedList as follows: defined('JPATH_PLATFORM') or die; JFormHelper::loadFieldClass('groupedlist'); JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php'); //load fields helper class ...


2

I consider this a very valuable question that does not have good write-ups/tutorials yet in Joomla documents (we should create one). I am trying to give here some workable info on this. Loading Form Fields using Joomla implemented show-on conditions is not for loading dynamically changing checkboxes, list or combo field's values and fields. For loading Form ...


1

Use Joomla\CMS\Form\FormField::getAttribute() method: $field->getAttribute('article');


1

I started out following the Joomla examples and did have form or view name in all labels but found it easier to just have one definition per extension. For circumstances where you might need an different version you can look at the 'alt' method of the TEXT api, https://api.joomla.org/cms-3/classes/Joomla.CMS.Language.Text.html, which can be used for more ...


1

First of all you may well be able to use the Joomla SQL Form Field for your Job Title field, instead of having to write a custom field. To make the Technologies dropdown dependent upon the Job Title field you may be able to use the showon attribute as described in Enabling showon to work in list options. In your Technologies custom field you'd have to select ...


1

If you'd like to perform this override for all file form fields only within your component, then you can override the layout at component level. To do this copy the following layout: layouts/joomla/form/field/file.php to: components/com_YOURCOMP/layouts/joomla/form/field/file.php If the form field reside in the administrator views, then copy the layout ...


1

SAVE THE DATA I want to share how I have created the solution to my problem. Along with the plugin there is a component than is relate with the work I doing, and both will work together. The component has other purposes, but taking advantage of the fact that much of the logic that the plugin needs, is already made or is reusable through the model classes, ...


Only top voted, non community-wiki answers of a minimum length are eligible