Hot answers tagged

3

Download Flexi Custom Code Module from the JED. Install the module and publish it to the position of your choice. Below the custom code box leave the option to use PHP on and disable the cleanup of html, js, and css. Enter this code into the custom code box: <?php JHtml::_('behavior.formvalidation'); $JInput = JFactory::getApplication()->input; $...


3

You are calling parent::publish(). This method has an array which maps tasks to states (line 190): $data = array('publish' => 1, 'unpublish' => 0, 'archive' => 2, 'trash' => -2, 'report' => -3); Then it gets the task (next line): $task = $this->getTask(); Which is "setup" in your case. After that it tries to read the value of the task ...


1

You can definitely delete rows from multiple tables in a single query, but Joomla doesn't offer a query-building technique to accommodate this. If you absolutely demand that query builder methods must be used, then you'll need to conduct some "surgery" (which isn't very pretty) on the generated query before executing it -- see https://joomla....


1

Why don't you do it in 2 steps? I would do something like the following code. As you can see I use name spacing (since Joomla 3.8), used quoteName the table + field names and added a try/catch block. use Joomla\CMS\Factory; public function delete_codes() { $id = $this->input->getInt('id'); $query = $db->getQuery(true) ->delete($db->...


1

Add task field to the form's HTML. <input name="task" type="hidden">


1

It depends on what do you mean a task. You can override the files located in the tmpl folder in your template. Check this out: https://docs.joomla.org/Understanding_Output_Overrides


1

No it's not possible. You need a component to handle tasks in Joomla.


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