Help:Inputbox

From UBC Wiki

The InputBox extension adds already created HTML forms to wiki pages. Users can "complete" a form (entering text, selecting menu items, etc.) by entering text into the box.

Examples

Example wikitext

It allows you to create a inputbox that allows your student to create a new page under the prefix Course:ABCD123/2020/.(For example: Course:ABCD123/2020/Project_test) . When student create a new page, it will preload a template called Course:ABCD123/Assignment_Template
<inputbox>

useve=yes

placeholder=project title here

preload=Course:ABCD123/Assignment_Template

prefix=Course:ABCD123/2020/

type=create

</inputbox>

It allows you to create a search box that allows your student to search for pages within the subpages of Course:ABCD123
<inputbox>

type=search

default=Course:ABCD123/

namespaces=Course

placeholder=search the course

</inputbox>

General Syntax

Input boxes are constructed like this:

<inputbox>

type=

width=

...

</inputbox>

The type parameter is mandatory. All other parameters are optional. For list of parameters, see #List_of_Parameters

Type Example Description
type=search
Creates a search box which has a default width of 50 characters. Information added in the text box is searched for.
type=create

Creates a new page. Information added in the text box is the name of the page which is edited.
type=comment

Adds a new section to the bottom of the page specified in the text box.
type=commenttitle

Adds a new section with the section header typed into the text box. The title can be specified with default= parameter. The page has to be specified with page= parameter.
type=fulltext
Search only with the fulltext search button, without the “Go” button.
type=move

Move a page to a different name.

List of Parameters

Parameter Scope Description Example
bgcolor= All types Sets the table background color (HTML color values). Do not use quotes. <inputbox>

type=search

bgcolor=#eeeeff

</inputbox>

width= All types Sets the width of the InputBox in characters. <inputbox>

type=comment

width=User talk:Eloquence

</inputbox>

default= All types Default text to put in the InputBox. <inputbox>

type=comment

default=User talk:Eloquence

</inputbox>

preload= create, comment, commenttitle The page under this title will be preloaded into the blank editbox when a new page is created. <inputbox>

type=create

preload=Log

</inputbox>

useve= create, comment When creating a page the input box will use the new visual editor, if this parameter is set to true <inputbox>

type=create

break=no

useve=true

</inputbox>

prefix= create
  • Create new page beginning with a certain prefix.
  • In type=move, the prefix is prepended to the default parameter.

Remark: underscores aren't recognized as spaces

<inputbox>

prefix=Course:ABCD123/2020/

type=create

</inputbox>

namespace= search, fulltext Support for namespace checkboxes in fulltext search.

With "Main**", main article namespace is checked by default.

<inputbox>

type=search

namespaces=Main**,Help

</inputbox>

placeholder= All types Define placeholder text that will display in the input box when it is empty. <inputbox>

type=search

placeholder=Search this Wiki

</inputbox>

For the full list of parameter, see Extension:InputBox#Parameters . Please note that some of the parameters listed on the external link is not compatible with current version of UBC Wiki.

Additional Resources