Topic on Project:Support desk

Two questions regarding edit forms

2
Mfort123 (talkcontribs)

Here is my setup:

MediaWiki 	1.23.5
PHP 	5.5.17 (apache2handler)
MySQL 	5.6.21 

When a user wants to add a new section, there will be a textbox with label "subject/headline". Is there a way to change that label? I am already familiar with the relevant hooks (editpage class), but I wasn't able to find a way to change the label. I guess I'd also be interested in knowing how I can change the copyright warning at the bottom of the edit form. So the first question is as follows:

Is there some way, preferably via a hook, to change the labels and messages related to edit forms?

Now the second question/issue concerns passing some information to the edit form so that I can reuse it when processing the edit. With simple forms, you can have a hidden textbox and then use that to pass information. Is there any way to do that with edit forms? Basically I have some information about the user that I need to hold and keep hidden from the user and then I would need that information for the 'EditPage::attemptSave' hook. The second question is basically:

Is there a way to pass hidden information to the edit form and recover it after the edit has been submitted (via a hook)?

Thank you in advance

This, that and the other (talkcontribs)

If you just want to change the text for your own wiki, you can edit the relevant system message in the MediaWiki amespace. To find the right message to edit, you can use Special:AllMessages on your wiki, or alternatively, use the procedure outlined at qqx. See https://www.mediawiki.org/w/index.php?title=Project:Sandbox&action=edit&section=new&uselang=qqx for an example "qqx" URL, which tells you that the page you need to edit on your wiki to edit the "Subject/headline" message is MediaWiki:Subject.

As for the second issue, if you pass the information in a hidden form field , the user will still be able to see the information by viewing the HTML source of the edit page. Couldn't you simply fetch the relevant information in the EditPage::attemptSave hook, and do all the processing internally?

Reply to "Two questions regarding edit forms"