Expand all


Obtain feedback from users. Functionality is provided by the mediawiki.feedback ResourceLoader module.

This is a way of getting simple feedback from users. It's useful for testing new features — users can give you feedback without the difficulty of opening a whole new talk page. For this reason, it also tends to collect a wider range of both positive and negative comments. However you do need to tend to the feedback page. It will get long relatively quickly, and you often get multiple messages reporting the same issue.

It takes the form of an element on your page which, when clicked, opens a small dialog box. Submitting that dialog box appends its contents to a wiki page that you specify, as a new section.

This feature works with any content model that defines a mw.messagePoster.MessagePoster.

// Minimal usage example
mw.loader.using( 'mediawiki.feedback').then(() => {
    var feedback = new mw.Feedback();
    $( '#myButton' ).click( function () { feedback.launch(); } );

You can also launch the feedback form with a prefilled subject and body. See the docs for the launch() method.


Feedback dialog for use within the context mw.Feedback.


new mw.Feedback([config]) #

Create an instance of mw.Feedback.


Name Type Attributes Description
config Object optional

Configuration object

Name Type Attributes Default Description
title mw.Title optional

The title of the page where you collect feedback.

apiUrl string optional

api.php URL if the feedback page is on another wiki

dialogTitleMessageKey string optional

Message key for the title of the dialog box

bugsLink mw.Uri | string optional

URL where bugs can be posted

showUseragentCheckbox boolean optional

Show a Useragent agreement checkbox as part of the form.

useragentCheckboxMandatory boolean optional

Make the Useragent checkbox mandatory.

useragentCheckboxMessage string | jQuery optional

Supply a custom message for the useragent checkbox. Defaults to the mw.Message 'feedback-terms'.



launch([contents]) #

Modify the display form, and then open it, focusing interface on the subject.


Name Type Attributes Description
contents Object optional

Prefilled contents for the feedback form.

Name Type Attributes Description
subject string optional

The subject of the feedback, as plaintext

message string optional

The content of the feedback, as wikitext

Modify the display form, and then open it, focusing interface on the subject.

onDialogSubmit(status, feedbackPageName, feedbackPageUrl) #

Respond to dialog submit event. If the information was submitted successfully, open a MessageDialog to thank the user.


Name Type Description
status string

A status of the end of operation of the main feedback dialog. Empty if the dialog was dismissed with no action or the user followed the button to the external task reporting site.

feedbackPageName string
feedbackPageUrl string
Respond to dialog submit event.