Hot answers tagged

4

You can use JSON format in the controller directly by adding .json suffix and changing format in your URL to json. In this case the controller would be placed in /administrator/components/com_example/controllers/ajax.json.php. It's contents: defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\Response\JsonResponse; class ExampleControllerAjax ...


3

This component is developed using Akeeba FOF, so you need to read the documentation to know how to complete the task. Almost everything is configured using XML, this is to some extent of course. To add the onchange javascript code to the dropdown list: https://github.com/akeeba/fof/wiki/XML-Form-Fields#additional-attributes-for-drop-down-list-fields Also, ...


1

Assuming you're using Joomla's default search tools layout, it does not render labels. You can create a custom layout or a layout override specific to your component. To accomplish the second option: Copy layouts/joomla/searchtools/default/filters.php to administrator/components/com_yourcomponent/layouts/joomla/searchtools/default/filters.php Replace this ...


1

Create a hidden field in your form: <field name="example" type="hidden" /> Before submitting the form, populate this field with the ID or name of the field used to submit the form: <field name="access" type="accesslevel" label="JOPTION_FILTER_ACCESS" description="JOPTION_FILTER_ACCESS_DESC" onchange="document....


1

I see a lot of weird answers with regular expressions and attribute handling... Why? Joomla! has a great API in JForm to do everything you need. Since it's not quite clear what you want to accomplish I'll give you three alternatives for doing things the Joomla! Way. If you want to remove a specific field from a form it's easy to do it if you know the name ...


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