Hot answers tagged

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 +---------------------+-------...
  • 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> <...
  • 26.5k
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" ...
  • 3,208
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 ...
  • 26.5k
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/...
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 ...
  • 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"...
  • 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 ...
  • 1,839
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 ...
  • 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"?> <...
  • 7,685
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.
  • 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 ...
  • 7,685
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 ...
  • 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" ...
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)....
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"...
  • 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 ...
  • 26.5k
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 ...
  • 4,055
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 ...
  • 4,055
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" ...
  • 689
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 ...
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.
  • 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 ...
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: ...
  • 2,275
2 votes

Get Value of Repeatable Field from Joomla XML manifest

Since you are getting data from your call and it's an' array you can do a simple (Working out from the idea that you are working on a developer server / system) echo '<pre>'; print_r($test); ...
  • 191
2 votes
Accepted

Components: What is the purpose of the option_on and option_off fields in models > forms > viewname.xml?

These options are generated (only) by extensions created with component-creator.com.
2 votes
Accepted

Maintaining Update XML for an extension

Joomla Installer iterates through all XML update nodes, looking for the latest matching version. It does not remembers previous valued from the "head" note. In addition, when the Installer adapter ...
  • 7,415
2 votes
Accepted

How to not overwrite specific file when installing extension update

Thought I'd expand on my comment. You're firstly going to need to add an install-uninstall-update script file to your component. Have a read of the Joomla Documentation on how to do this. Once you ...
  • 26.5k
2 votes
Accepted

Pulling XML parameter to PHP file

Firstly, you should always use a single string for the name attribute. If there are multiple words, it's best to separate with with an underscore and always ensure all characters are lowercase to ...
  • 26.5k
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 ...
  • 3,693

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