Overview


Each widget is bound to a field / semantic property.
Field widget helps on form generation / category page UI / field type checking.

Common Widget settings


All field widget has the same basic settings.
* Label, label showed in page UI, mostly depends on widget view;
* Field, field name of template field, as well as the property name;
* Description, description which appears on auto-generated form, help users understanding what to input;
* Access control, please view Access control.

Widget datatypes


Field widget has different datatypes. Users can choose datatype menu item, each field must have one datatype.

Common types

media, string, email, url

Common types has the same settings,
* Default, default value of the field;
* Possible values, all possible values, same as SMW 'Property:Allows_value'.

Possible values helps on auto form rendering.

Text

No possible value for text type.
* Keyword '__ALWAYS_NEW__' means the text area always be blank on users' editing. Mostly used on new comment field, work with SemanticHistory/SemanticArchive extension.

Date

Date picker UI bound to form field.

* Keyword '__ALWAYS_NOW__' means the date value always set to 'NOW' on users' editing.

File

Apply 'image' type for page rendering.

Form


View

Or use 'file link' only.

Number

Apply number range check to form field.


UID

Generate UID for page.

Page

To customize possible values in different ways.

From query results, if SMWHalo is deployed, QueryInterface may help.


Ajax way to get page names by property / category / namespace.


Widget

Use pre-defined category widget as compound data type, just import from other category widgets.

View

Form

Widget views


Viewing widget

* Editing index, specify the edit index of the field, the index will take effect on auto-generated form;
* Optional, whether the field is required, take effect on form editing;
* Multiple, whether the field has multiple values.

Table row

Table viewing

View

Section

Section viewing

View

Template(s)

Template will have the following input,

field_label | field_property | {{{field_name|default value}}} | <editidx=_IDX_> | <optional=true> | <multiple=true> | <other_parameters>
			
Template must have 'Category:SPM viewing templates'.
* Template:Value only, value as output;
* Template:Hidden field, no output there, just announce a widget field.