Help:Schema/Type/SEARCH FORM SCHEMA

SMWSearch integrates Semantic MediaWiki with special page "Search".CiteRef::gh:smw:3019 It adds support for using inline queries in the Special:Search context and provides an extended search profile where user defined forms can empower users to find and match entities using property and value input fields. In cases where the systems detects forms maintained using the SEARCH_FORM_SCHEMA, an extended profile will be visible on the Special:Search page allowing users to match and search subjects with help of Semantic MediaWiki.

SEARCH_FORM_SCHEMA
The SEARCH_FORM_SCHEMA schema type defines forms used in the extended Special:Search profile. The following sections explain how to build such a search form schema.

Properties

 * type: SEARCH_FORM_SCHEMA
 * tags: simple tags to categorize a schema
 * forms: defines the forms and fields to be displayed


 * Example

Form definition

 * type requires SEARCH_FORM_SCHEMA
 * forms defines a collection of forms
 * Books and journals as title of a form
 * Has title is a simple input field without any constraints
 * Publication type is a input field with additional attributes

Fields can define attributes such as:


 * autocomplete (true, false) whether the field should add an autocomplete function or not
 * tooltip (text or msg key) shows a tooltip with either a text or retrieves information from a message key
 * placeholder (text) shown instead of the property name
 * required (true, false) whether the field input is required before submitting or not
 * type (HTML5) preselect a specific type field

Default form
default_form to define a default form that is displayed when no other form was preselected.

Term parser
The term_parser prefix can be used to shorten the input cycle and summarize frequent properties so that a user can write:

instead of

Prefixes are only applicable (and usable as means the shorten the search term) from within the extended search form.

Namespaces
namespaces section defines namespaces to be preselected or hidden.


 * default_hide hides the namespace box by default on the extended profile form
 * hidden identifies namespaces that should be hidden from appearing in any SMW related form
 * preselect assign a pre-selection of namespaces to a specific form

Descriptions
Describes a form and is shown at the top of the form fields to inform users about the intent of the form.

Validation
Validation is made through