Topic on Project:Support desk

Jump to navigation Jump to search

What is the difference between label and contact-label in ContactForm?

6
49.230.16.152 (talkcontribs)

MediaWiki 1.34.2 with Extension:ContactPage

I have read the following sentence in HTMLForm documentation here which maybe I don't understand:

Label for a form input/button. Overridden by hlabel-message.

What is the difference between label and contact-label in ContactForm?

Isn't declaring a label makes contact-label redundant?

Ammarpad (talkcontribs)

Where did you see "contact-label"? It's neither in the master branch of ContactPage nor in HTMLForm.

182.232.169.61 (talkcontribs)

I am sorry,

I confused

Where contact-label I should have been:

'label-message' => 'emailmessage',

182.232.169.61 (talkcontribs)
Ammarpad (talkcontribs)

The difference is already in their names. 'label-message' takes a MediaWiki message key or object. So when you have 'label-message' => 'emailmessage', the label will be fetched via standard message mechanism at MediaWiki:emailmessage. If you use 'label' => 'emailmessage', emailmessage will be output as is.

182.232.129.245 (talkcontribs)

The difference wasn't clear for me from their names :)

But after reading your explanation I understand that 'label-message' => 'emailmessage', is a command to automatically create some default label by the nature of MediaWiki per field type (and if data to do so is available) and 'label' => 'emailmessage' can utilize this possible behavior or instruct a custom label.

Reply to "What is the difference between label and contact-label in ContactForm?"