New answers tagged

0

This is the way it worked for me: $plugin = JPluginHelper::getPlugin('system', 'myplugin'); $params = new JRegistry($plugin->params); $baseUrl = $params->get('base_url', '');


0

I don't think there's a proper way of doing this without having to subclass the subform field and possibly the form class as well. But if your field is "one use only", i.e. you only mean it to be used in a specific form for your own purposes, you could try using Joomla\CMS\Form\Form::getInstance() with the name of the form. use Joomla\CMS\Form\Form;...


0

Session variables should be set and redirects performed only by the controller. I assume you already have some controllers in your components. Add the task to an existing one or create a new one, whichever is more appropriate for your component. The form: use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Router\Route; use Joomla\CMS\Uri\Uri; ?> <form ...


Top 50 recent answers are included