Hot answers tagged

12 votes
Accepted

Meaning of the "version" in any extension XML manifest file

First version tag specifies the xml version. Please refer W3 standards for XML Second version tag identifies the version of Joomla for which this extension is developed. And third version stands for ...
user avatar
  • 1,791
12 votes
Accepted

Available fields in Joomla XML manifest

Numerous types of form field are built into Joomla, with many usefull fields like calendar, color picker, image picker, file upload, file selection etc.: Available Fields +---------------------+-------...
user avatar
  • 13.3k
11 votes
Accepted

How to conditionally show fields in module xml?

You can use Joomla's showon attribute in your field. Here's an exmaple: <field name="first" type="list" label="Select Something"> <option value="1">Option 1</option> <...
user avatar
  • 26.4k
7 votes
Accepted

Best way to include CSS/JS files in my custom extension

The best way would be to use the media folder. So, you will firstly need to create a folder called media in your module folder. Note: This folder should be created before installing, not after. The ...
user avatar
  • 26.4k
7 votes
Accepted

How to write a loop in XML?

Currently you can perfectly use Integer form field. The integer form field type provides a select box with a range of integer values. <field name="age" type="integer" default="1" ...
user avatar
  • 3,208
6 votes
Accepted

What to use , simplexml_load_file or JForm::getInstance or?

JForm really does the same things as your more standard PHP code. If you jump into the definition for JForm at libraries/joomla/form/form.php and look through the functions, you will see ...
user avatar
5 votes

How do you specify to show only certain editors-xtd buttons on the editor form field type?

What should happen is that you pass a string of comma separated values into the form field of the buttons that you do not want to appear. This gets exploded into an array here: https://github.com/...
user avatar
5 votes

Where can I find list of the available Joomla-WYSIWYG-Editor buttons etc

Every folder inside the following folder is a plugin for Tiny-MCE editor: /media/editors/tinymce/plugins/ They are: advlist anchor autolink autoresize autosave bbcode charmap code colorpicker ...
user avatar
  • 2,275
5 votes
Accepted

How to insert "php code" inside the .xml manifest file of a Joomla module?

Try this , Normally Joomla provides all major components categories in XML accessible way. For eg: you need banner category dropdown simply use like below. <field name="catid"...
user avatar
  • 1,507
5 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 ...
user avatar
  • 1,819
4 votes

How to insert "php code" inside the .xml manifest file of a Joomla module?

I would suggest taking a look at http://docs.joomla.org/Creating_a_custom_form_field_type Since it looks like what you are trying to achieve. While the guide may be referring to components this can ...
user avatar
  • 191
4 votes

Joomla XML form fields in content

Yes, with Joomla's JForm, you can use them virtually anywhere - here's a tutorial that might help, and an example to Custom field in a content plugin: <?xml version="1.0" encoding="UTF-8"?> <...
user avatar
  • 7,665
4 votes
Accepted

Where can I find list of the available Joomla-WYSIWYG-Editor buttons etc

These buttons are coming from the editors XTD plugins. The defaults XTD buttons are article, pagebreak, readmore, image. But there are extensions that can install their own XTD buttons, e.g Joomla ...
user avatar
  • 19.5k
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" ...
user avatar
4 votes
Accepted

Trying to save multiple field in Plugin

According to the comments on this question, the answer is to remove filter="string" attribute from XML manifest file.
user avatar
  • 2,275
4 votes

Trying to save multiple field in Plugin

Use value and title (not country) in the sql. I believe your SQL should be as follows: SELECT country_3_code as value, country_name as title FROM #__mymuse_country ORDER by country See SQL form ...
user avatar
  • 7,665
4 votes
Accepted

Custom XML attributes not showing in HTML markup

Though the XML file and the rendered HTML both call them attributes, there is not a direct pass through of values. Hence, only some attributes make it to the HTML (and some extra attributes are added)....
user avatar
4 votes
Accepted

How do you specify to show only certain editors-xtd buttons on the editor form field type?

Try something like this: buttons = "true" | Show all buttons. hide = "article,image" | An array of the buttons you want to hide. <field name="myeditor" label ="label text" type="editor"...
user avatar
  • 19.5k
4 votes
Accepted

Range form field type

When ever in doubt about Joomla's form fields, have a look at the following directory, where you will find each one. libraries/joomla/form/fields To get a range form field, you can use the ...
user avatar
  • 26.4k
4 votes

Populate multi select data into the custom list field of form inside user management

You are doing it completely wrong. Never make core changes to files/classes because there are big chances that you will lose everything on the next CMS update. Instead use plugins. It is the best way ...
user avatar
  • 4,045
3 votes
Accepted

How to output a grouped list with multiple items selected in Joomla?

How do you store these values? Seems that is an array and should be displayed as: <?php foreach ($params->get('mylistvalue') as $value) : ?> <?php echo $value; ?> <?php ...
user avatar
  • 4,045
3 votes
Accepted

Module XML with SQL field (JFormFieldSQL) - Custom Form Field - Check if table exists

Your concern is justified. Indeed, if there is an SQL error, the backend of the module will crash. If this is a must have for you, I would look into extending the JFormFieldSQL with a custom ...
user avatar
3 votes
Accepted

Creating custom field type multiselect list - how to save the values?

XML file <fieldset name="brand_params" addfieldpath="/modules/mod_manufacturers/fields" > <field name="foreignmanuf" type="Manulist" label="Foreign Brands" ...
user avatar
  • 689
3 votes
Accepted

Default module layout not honoured in the admin (when adding a module)

Based on looking at the code of the modulelayout.php file, it looks like you may have to preface the layout name with _:. So your xml field would look like this: <field name="layout" type="...
user avatar
3 votes

What to use , simplexml_load_file or JForm::getInstance or?

use simplexml_load_file JForm - it the class for form building and basically it the layer between you and simplexml, so it will be slower than just simplexml_load_file but your code can be simpler, ...
user avatar
  • 644
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.
user avatar
  • 2,388
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 ...
user avatar
2 votes
Accepted

How to setup $form->loadFile method properly?

No, it doesn't override the field in place, it overrides the node in place. In your case you are merging node:fieldset->name:advanced node:field->name:templateBackgroundColor... into node:...
user avatar
  • 101
2 votes

checkboxes field type in module settings not checked by default

if you want that the values link and video be checked by default, so you do something like this: <field name="fb_posttype" type="checkboxes" checked="link,video" label="Post types"> ...
user avatar
2 votes

Best way to include CSS/JS files in my custom extension

I assume that your extension is a component. The best way is to create a media directory beside admin and site directories. Then put js, css and img files inside separate directories like this: ...
user avatar
  • 2,275

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