Hot answers tagged

3

Are you talking about the repeatable custom field? If so, then you could try the following: Download a copy of the latest Joomla (3.9.26 as of this writing). Go to the folder /plugins/fields. Copy/upload the 'repeatable' map to your Joomla site and add it in the same folder (/plugins/fields). In the backend of your Joomla site go to Extensions > Manage &...


3

There really isn't a good way to do this. Your best bet is parsing the already generated HTML and making a replacement there. For the component this can be done using onAfterDispatch event. Below is a basic example that adds enctype attribute to all component forms with item-form ID. Regex can probably be optimized and maybe a check should be added to ...


1

Assuming this is for Joomla 3, you can use the following: use Joomla\CMS\Factory; use Joomla\CMS\MVC\Model\BaseDatabaseModel; \JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php'); BaseDatabaseModel::addIncludePath(JPATH_SITE . '/components/com_content/models', 'ContentModel'); $model = BaseDatabaseModel::...


1

Neither form fields, nor their layouts are really designed to be used outside of Form API. Things can break very easily this way. A form instance is expected in some fields and a field instance in some layouts. To use a form field alone you have to create a SimpleXMLElement instance with the field tag as it would appear in the form definition and pass it to ...


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 ...


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