2
votes

I'm writting a plugin for Joomla (first time working with Joomla) and I'm in need of something a bit different for the plugin options/parameters.

I need to have a field for each user group with a select that has a list of options. I'm not looking for a select with the list of user groups, what I need is the opposite, a parameter for each user group.

I'm guessing I can't use xml for this and it has to be programatically but I have no idea how to do this and I've been looking for hours now without any luck.

Any help is appreciated, Thanks in advance

2

2 Answers

1
votes

Have you checked SQL form field type out from Joomla documentation?

0
votes

You may create custom form field.

Look in administrator/components/com_banners/models/fields/.

Place the code in plugins/plugintype/pluginname/fields/customfield.php

In plugin configuration (pluginname.xml) add field path:

<config>
    <fields
        name="params"
        addfieldpath="/plugins/plugintype/pluginname/fields"
    >
        <fieldset
            name="basic"
        >
            <field
                name="customfield"
                type="customfield"
            />
        </fieldset>
    </fields>
</config>