12
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 the version of this extension.
Refer Joomla Manifest for details.
12
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
+---------------------+-------------------------------------------------------------------------------------------------------+
| TYPE | DESCRIPTION ...
11
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>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</field>
<field name="second" type="list" label="Select ...
7
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 inside the media folder, create 2 sub folders, css and js. This isn't required but it's just nicer to keep things separate.
Then add the following to your XML ...
7
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"
label="Age"
description="age"
first="1"
last="100"
step="1"
/>
first would be minimum age and last would be maximum age.
ALTERNATIVE
Another ...
6
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 simplexml_load_file() and a loop in the function findFields() that matches your query.
And you are correct that you will probably get a performance boost from the first ...
5
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
compat3x
contextmenu
directionality
emoticons
example
example_dependency
fullpage
fullscreen
hr
image
importcss
insertdatetime
layer
legacyoutput
link
lists
media
...
5
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"
type="category"
extension="com_banners"
label="JCATEGORY"
multiple="true" size=...
5
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/joomla/joomla-cms/blob/staging/libraries/cms/form/field/editor.php#L222
In the form field you get a JEditor Instance and in the getButtons method there it will ...
5
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 not to do this, for example if you wish to retain the original functionality. Also if there is ever an update, there's a chance your XML file will be ...
4
According to the comments on this question, the answer is to remove filter="string" attribute from XML manifest file.
4
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 field type for other variations that might be more suitable for your need.
4
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 also work with modules, (I've tried it myself)
simply follow the guide but instead of placing your files at
/administrator/components/<name of your component&...
4
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"?>
<form>
<fields name="params" >
<fieldset name="params" >
<field
name="content_myfield"
...
4
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 Works Simple Image Gallery Pro, or NoNumber Content Templater etc..
Check in the plugin manager for the Editor's plugin to see what's there.
But I think I ...
4
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).
All of this is based on the class that you can see here: https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/form/fields/text.php#L163
So for ...
4
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"
editor="jce"
buttons="true"
width="450"
height="280"
hide="article,image"
filter="safehtml"
description="description text" />
4
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 following:
<field
name="range"
type="range"
default="1"
label="Choose a number"
description=""
min="1"
max="10"
step="1" /&...
4
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 to extend core functionality. What you need here is a simple profile plugin. Read the tutorial Creating a profile plugin.
And if you use a standard list field ...
3
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 endforeach; ?>
3
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 implementation where you can check for SQL errors or do a MYSQL check like SHOW TABLES LIKE 'mycomponenttable'
See How to create a custom form field type in a module?...
3
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" class="btn-group btn-group-yesno"
After that you continue with the rest of the code as normal.
3
XML file
<fieldset name="brand_params" addfieldpath="/modules/mod_manufacturers/fields" >
<field name="foreignmanuf"
type="Manulist"
label="Foreign Brands"
multiple="true"
description="Foreign Cologne Brands" />`
</fieldset>
Now to create a custom field type:
mod_manufacturers/fields/...
3
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="modulelayout"
label="JFIELD_ALT_LAYOUT_LABEL"
description="JFIELD_ALT_MODULE_LAYOUT_DESC"
default="_:mylayout" />
I'm seeing in the file that it sets a select ...
3
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, look at SimpleXMLElement::xpath for find a field, and at SimpleXMLElement::attributes for get all attributes or just use (string) $field_that_you_found['style']
3
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.
3
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 extension starts with:
<?xml version="1.0" encoding="utf-8"?>
Noticed the difference? The encoding paramter ITS CASE SENSITIVE! I am not sure if that ...
2
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:fieldset->name:advanced
node:field->name:templateColor...
node:field->name:templateBackgroundColor...
....
The order of your fieldset node is: ...
2
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">
<option value="status" >Statuses</option>
<option value="link">Links</option>
<option value="photo">Photos</option>...
2
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:
index.html
YOUR_COMPONENT_NAME.xml
[+] admin
[+] site
[-] media
[-] js
main.js
index.html
[+] css
[+] img
Note that any folder should have an ...
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
xml × 71joomla-3.x × 26
php × 14
module × 10
form-fields-types × 10
component × 7
jform × 7
form × 7
development × 6
joomla-2.5 × 5
extensions × 5
custom-component × 5
custom-field × 5
fields × 5
module-params × 5
overrides × 4
joomla-3.6 × 4
plugin × 3
custom-module × 3
editor × 3
joomla-3.4 × 2
templates × 2
joomla-3.3.x × 2
update × 2
multilingual × 2