Skip to content
10 changes: 10 additions & 0 deletions libraries/src/MVC/View/FormView.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Toolbar\ToolbarHelper;
Expand Down Expand Up @@ -230,6 +231,15 @@ protected function addToolbar()

ToolbarHelper::divider();

if ($this->form instanceof Form) {
$formConfig = $this->form->getXml()->config->inlinehelp;
$targetClass = (string) $formConfig['targetclass'] ?: 'hide-aware-inline-help';

if ((string) $formConfig['button'] === 'show') {
ToolbarHelper::inlinehelp($targetClass);
}
}

if ($this->helpLink) {
ToolbarHelper::help($this->helpLink);
}
Expand Down