Extension:Semantic Forms Inputs

Description
Semantic Forms Inputs is an extension to MediaWiki that provides additional input types for Semantic MediaWikis that use the Semantic Forms extension.

The Semantic Forms extension allows users to add, edit and query data of a Semantic MediaWiki using forms. For every form field the input type specifies the type of input a field will have in the form. Semantic Forms comes with basic input types for all data types. This extension -- Semantic Forms Inputs -- aims to collect further, optically and/or functionally enhanced input types.

Installation
''Note: Having MediaWiki (version 1.22 or higher) and Semantic Forms (versions 3.4.3 to 3.6.0) installed is a precondition for the Semantic Forms Inputs extension; the code will not work without them. Lower versions might work but are not tested.''


 * 1) Download a released version or the current development version and extract the files to the   directory
 * Alternatively you can clone Semantic Forms Inputs using git
 * 1) Rename the new folder to , if necessary
 * 2) Add to the end of LocalSettings.php:
 * 3) Do some customization if necessary (see below)
 * 4) Go to the Special:Version page of your wiki and verify that an entry for Semantic Forms Inputs exists

There is a version history available.

Customization
You can change the settings of the Semantic Forms Inputs extension by placing new settings in your LocalSettings.php file, below the inclusion of SemanticFormsInputs.php.

You can find all the default settings and their descriptions in the file SFI_Settings.php.

Time picker


Input type: timepicker

The time picker lets a user pop up a menu of hours and minutes and choose a time from it. You can tweak the appearance of the time picker by changing or overriding the CSS rules of the jQuery library and/or the SFI time picker stylesheet.

Examples
Example: A field that uses a time picker with all parameters set to their default values

Example: A field that uses a time picker with specific parameters:

DateTime picker
Input type: datetimepicker

The datetime picker is a combination of the Date picker and the  Time picker. It presents the datepicker and timepicker inputs side by side and returns one combined value in the format "yyyy/mm/dd hh:mm".

Examples
Example: A field that uses a datetime picker with all parameters set to their default values

Example: A field that uses a datetime picker with specific parameters:

Parameters
The parameters are the same as for the component inputs, i.e. for datepicker and timepicker combined. Exceptions are given below:

Menuselect


Input type: menuselect

The menuselect input type lets a user pop up a menu with submenus and choose an entry from it. To use the menuselect you have to pass the menu structure as an unordered list. If you use wiki-internal links, the link text will be shown in the menu while the name of the target article will be sent back to the form. This currently only works in the development version on Git.

This input type is intended to display menus of modest dimensions. It is not intended for monsters with hundreds of entries in dozens of submenus. You have been warned.

You can tweak the appearance of the menuselect by changing or overriding the CSS rules of the jQuery library and/or the SFI menuselect stylesheet.

If you need to use the pipe symbol (|) in the structure, you have to replace it by | .

Examples
Example: A field that uses a menuselect with all parameters set to their default values

Example: A field that generates the menu structure from semantic data. You need Extension:SemanticResultFormats version 1.9 or later for this to work.

Two Listboxes
Input type: two listboxes

The twolistboxes input is very much like a listbox input from Semantic Forms. Use it if you need to add a list of predefined values to the field. The left listbox contains the possible values. If you click on one of the values it will move to a right listbox and will be considered as selected.

Use this input in conjunction with parameters.

Examples
Example:

Example:

Date Check
Input type: datecheck

The datecheck input is new in version 0.8. It checks if the inserted date has the right Format.

we use this JQuery Plugin: http://formvalidator.net/#default-validators_dates

Examples
Example:

Credits
SFI uses the jQuery and jQuery UI Javascript libraries for several input types.

Button icons for 'datetimepicker' and 'timepicker' are derived from the Mini Icons 2 icon set from brandspankingnew.net. See the relevant article on brandspankingnew.net

Finally, internationalization was achieved through the work of the translatewiki community. See translatewiki.net

Contact
Bugs should preferably be reported on the Wikimedia bug tracker.

Comments, questions and suggestions should be sent to the Semantic MediaWiki User mailing list.