diff --git a/mod/forum/classes/output/big_search_form.php b/mod/forum/classes/output/big_search_form.php
index 6a983d6e2cf98..e2bd7cee46f94 100644
--- a/mod/forum/classes/output/big_search_form.php
+++ b/mod/forum/classes/output/big_search_form.php
@@ -53,6 +53,8 @@ class big_search_form implements renderable, templatable {
public $subject;
public $user;
public $words;
+ /** @var string The URL of the search form. */
+ public $actionurl;
/**
* Constructor.
@@ -65,6 +67,7 @@ public function __construct($course) {
$this->course = $course;
$this->scripturl = new moodle_url('/mod/forum/forum.js');
$this->showfullwords = $DB->get_dbfamily() == 'mysql' || $DB->get_dbfamily() == 'postgres';
+ $this->actionurl = new moodle_url('/mod/forum/search.php');
$forumoptions = ['' => get_string('allforums', 'forum')] + forum_menu_list($course);
$this->forumoptions = array_map(function($option) use ($forumoptions) {
@@ -161,6 +164,7 @@ public function export_for_template(renderer_base $output) {
$data->subject = $this->subject;
$data->user = $this->user;
$data->showfullwords = $this->showfullwords;
+ $data->actionurl = $this->actionurl->out(false);
$datefrom = $this->datefrom;
if (empty($datefrom)) {
diff --git a/mod/forum/templates/big_search_form.mustache b/mod/forum/templates/big_search_form.mustache
index 373694edc799a..ffdc3886a8c65 100644
--- a/mod/forum/templates/big_search_form.mustache
+++ b/mod/forum/templates/big_search_form.mustache
@@ -15,7 +15,38 @@
along with Moodle. If not, see