diff --git a/phpBB/phpbb/template/twig/extension/forms.php b/phpBB/phpbb/template/twig/extension/forms.php index 5a3d9420db..b146aacfb9 100644 --- a/phpBB/phpbb/template/twig/extension/forms.php +++ b/phpBB/phpbb/template/twig/extension/forms.php @@ -183,6 +183,7 @@ class forms extends AbstractExtension 'GROUP_ONLY' => (bool) ($form_data['group_only'] ?? false), 'SIZE' => (int) ($form_data['size'] ?? 0), 'MULTIPLE' => (bool) ($form_data['multiple'] ?? false), + 'ONCHANGE' => (string) ($form_data['onchange'] ?? ''), ]); } catch (\Twig\Error\Error $e) diff --git a/phpBB/styles/all/template/macros/forms/select.twig b/phpBB/styles/all/template/macros/forms/select.twig index 827ccb1121..1ada063e57 100644 --- a/phpBB/styles/all/template/macros/forms/select.twig +++ b/phpBB/styles/all/template/macros/forms/select.twig @@ -8,6 +8,7 @@ name="{{ NAME }}" {% if TOGGLEABLE %}data-togglable-settings="true"{% endif %} {% if MULTIPLE %}multiple="multiple"{% endif %} + {% if ONCHANGE %}onchange="{{ ONCHANGE }}"{% endif %} {% if SIZE %}size="{{ SIZE }}"{% endif %}> {% for element in OPTIONS %} {% if not GROUP_ONLY and element.options %}