Uncategorized

Mediawiki Forms to present and edit data with key-value structure

(Last Updated On: 18 December, 2018)

Have you been working with tables in Mediawiki? It is a somewhat gnarly process. The mediawiki markup for a small example table is like this:

{|
|Orange
|Apple
|-
|Bread
|Pie
|-
|Butter
|Ice cream
|}

The result on the Mediawiki article will then be shown like this:

Orange Apple
Bread Pie
Butter Ice cream

This is fine with small tables, but when they grow in length, it’s getting more difficult to edit.

With Mediawiki Forms, you can add functionality so that you will get a HTML form to edit your data.

Here is an example that shows data being edited with a HTML form in Mediawiki. This makes it much easier for a user to add and edit data, compared to edit mediawiki table markup:

The downside of Mediawiki Forms is that it is slightly difficult to get started. One need to install this extension: https://www.mediawiki.org/wiki/Extension:Page_Forms

After that you have to create a template, then a form based on that template. In the process one also creates a category.

I recommend that one read this page carefully: https://www.mediawiki.org/wiki/Extension:Page_Forms/Quick_start_guide

and remember adding forms to a Mediawiki site might take you a bit more time than you might think.

It is worth it though, especially if you have spreadsheet like data in the form key-value that you like to have presented on the web, and at the same time want your users to easily add and change existing data in your wiki.

Good luck!

Leave a Reply

Your email address will not be published. Required fields are marked *