Today I needed to add a new toolbar button to a custom Joomla! component. In the past, I’ve used a more convoluted method of overriding the submitbutton() (or Joomla.submitbutton) JavaScript function and triggering the modal popup manually, but stumbled upon a better solution.