Skip to main content
Share Your Experience: Take the 2024 Developer Survey
6 votes
Accepted

How do I override a Joomla XML?

I bow down to @Lodder experience and assume you cannot overcome this issue by overriding the XML. However, you still have two options: Either edit the original XML file Although, there may be reasons ...
Eoin's user avatar
  • 1,954
4 votes

Available fields in Joomla XML manifest

There is also one other neat trick - when using Radio buttons, you can add Bootstrap class and they will look nicer. Look for class attribute in this code: <field name="some-choices" type="radio" ...
Vladimir Jovanović's user avatar
4 votes
Accepted

Custom Module not on the JED how to show compatibility information?

In your manifest .xml file for your extension(s) you can specify the <updateservers> element that provides a link to your own website that contains a .xml file that has details about your ...
Irata's user avatar
  • 3,947
3 votes
Accepted

XML form related fields

Have you tried to use Subform field?. It allows you to nest XML forms inside each other or reuse your existing forms inside your current form. And your need, you can combine it with showon attribute.
webchun's user avatar
  • 2,418
3 votes

What is wrong with this XML Package Installation file? Joomla cant find XML on Package

Ok, I discovered what the issue was.. It was just something very silly. The issue was that the XML on the pkg starts with: <?xml version="1.0" encoding="UTF-8" ?> And the XML on one of the ...
user1967509's user avatar
3 votes
Accepted

Dynamically add option to Jform field

You're already aware of Joomla\CMS\Form\Field\ListField::addOption() method. value is an attribute in the XML so it needs to be passed along with other attributes in the second argument: $this->...
Sharky's user avatar
  • 11.4k
2 votes
Accepted

What is wrong with this XML Package Installation file? Joomla cant find XML on Package

I've tested with your code, and it works for me. To try and isolate the bug, I'd probably firstly remove the <files> node and the packages folder and see if you get a Package Update: There were ...
RichardB's user avatar
  • 3,082
2 votes
Accepted

Issues updating from Joomla 3.4.8 to 3.6.5

We don't have the full information and historical of your site and it's not clear if the update you have is prior to any update attempts. Also, it's not clear if any of your issues existed before your ...
FFrewin's user avatar
  • 19.7k
2 votes

How to define Array in XML field - Joomla

Sadly, this is not how it works in Joomla. Your fields have to have unique names. If you only have these 3 fields, I would suggest to name your fields s1img_1, imgSetting_1, s1img_2, ... This will ...
fruppel's user avatar
  • 3,733
2 votes

XML file does not upload with my custom module

The manifest (main xml) is the only file that doesn't need to be included in the manifest (ie itself). Other xml files need to be listed either as files or be in listed folders. One attribute in the ...
jamesgarrett's user avatar
  • 3,299
2 votes
Accepted

How do I override an .xml file in a Joomla component?

You should check Joomla Plugins and Events. There are such events like onContentPrepareForm($form, $data) and (may be you'll want to use onContentPrepareData($context, $data) but you should be fine ...
Alexandr's user avatar
  • 1,130
2 votes
Accepted

Crawling Joomla websites without parsing website's html

Joomla! 4.0 will have Web Services. In 3.x, without using extensions or custom code, there's no way to do this for single articles. For article listings (category views) you could use RSS/Atom feed ...
Sharky's user avatar
  • 11.4k
2 votes
Accepted

Add text and link to fieldset in config.xml

You could try the "spacer" field type and see if that's good enough for your purposes: <field name="example_spacer" type="spacer" label="Text you want here" /> Then put it in your XML file ...
Arlen's user avatar
  • 802
2 votes

Dynamically removing single JForm option

Another option could be to place the two versions of the field in separate .xml files in your /forms folder and then decide which one to load. If ($option == 1) { $form->loadFile('...
Irata's user avatar
  • 3,947
2 votes

Dynamically removing single JForm option

So this is what I've done: protected function preprocessForm(JForm $form, $data, $group = '') { $app = JFactory::getApplication(); ... if ($app->isClient('site')) { // ...
Mike's user avatar
  • 351
2 votes

Dynamically removing single JForm option

The small problem with your question is that <option> is not a field attribute but an element in XML, so you cannot set or remove that using methods for field attributes. You can remove however ...
Zollie's user avatar
  • 2,936
2 votes

How to enable or disable plugins from manifest file?

In order for this to work properly you would use enable="true" to enable the plugin and disable="true" to disable the plugin.
Scott Smith's user avatar
2 votes
Accepted

subform inside subform in module

Access the link fields the same way you're accessing other fields, through the main activities field. <?php foreach ((array) $activities as $activity) : ?> <?php foreach ((array) $...
Sharky's user avatar
  • 11.4k
2 votes
Accepted

HTMLHelper call a custom class in a module

You need to register the HTML services with the service registry. If your component uses the same convention as Joomla core, then the services are registered during the boot up process of the ...
Sharky's user avatar
  • 11.4k
2 votes

Can the package XML be accessed from the preflight method?

Yes, you can. The preflight method has two parameters, and you can, for example, obtain the current version being installed with: function preflight($type, $parent) { $version = (string) $parent-&...
mbrampton's user avatar
  • 314
2 votes
Accepted

use file or filename in XML

Each file to copy must be represented by a <filename> element. If you want to copy an entire folder at once, you can define it as a <folder>. Useful resource to consult: https://docs....
Carlitorweb's user avatar
2 votes
Accepted

Get the form fields as defined in the form xml file

There is Joomla\CMS\Form\Form::getFieldset() method for returning an array of fields belonging to a fieldset as Joomla\CMS\Form\FormField objects. $fieldNames = []; foreach ($form->getFieldset('...
Sharky's user avatar
  • 11.4k
2 votes

Params field value for extension in database is inconsistant when using subform & default values, it returns either a string or an object, how to fix?

When your plugin is installed the manifest(.xml) file is parsed and a fairly basic process of saving your values into the #__extension table occurs. In the case of the params the default= is being ...
Irata's user avatar
  • 3,947
2 votes
Accepted

Create Custom Form via SimpleXMLElement

Unfortunately the Joomla error message is a bit misleading here. It's not complaining about your $xml element passed in, but rather than the basic <form> structure hasn't been initialised ...
Robbie Jackson's user avatar
1 vote

XML full stable Joomla package location?

You can find the Latest Joomla! Release here: https://downloads.joomla.org/latest
pe7er's user avatar
  • 2,058
1 vote

Add customfields in the administration section of a module

You can do this with a content plugin quite easily. See this guide for starters. You create the XML in your plugin form/modwhatever.xml. Now you can add whatever fields you wish - you might want to ...
Grant G's user avatar
  • 714
1 vote

Using form XML for custom filter and removing group definition

So this is what I ended up doing: $value = Factory::getApplication()->input->getInt('category'); $bookform = Form::getInstance('com_books.book', 'book'); $field = $bookform ->getField('...
Mike's user avatar
  • 351
1 vote

How to add default values to Joomla subform fields?

https://docs.joomla.org/Text_form_field_type default (optional) (not translatable) is the default value. <field name="mytextvalue" type="text" default="Some text" ...
AHeavyObject's user avatar
1 vote

Cache works for html view but not for xml output

https://stackoverflow.com/questions/18448077/how-to-cache-a-php-generated-xml-file-in-joomla An older question, but may give you a direction to consider to figure out what to add into the code ...
Patrick Jackson's user avatar
1 vote
Accepted

Show article details from custom module

As far as I know, the SQL form field will always return the ID of an article. So you can get the title, into text and intro image, you can use Joomla's Table class: use Joomla\CMS\Table\Table; $...
Lodder's user avatar
  • 26.9k

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