The Creator

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.

InputBox was originally created by <tvar|user>Erik Möller</> for the purpose of adding a <tvar|create-article>*⧼Articleplaceholder-abouttopic-create-article-button⧽*</> box to Wikinews.

## Example

Box for starting a new article.

```
<inputbox>
type=create
break=no
</inputbox>

 Result
</translate>

## General syntax

InputBoxes are constructed like this:

```
<inputbox>
type=
bgcolor=
width=
default=
preload=
editintro=
buttonlabel=
hidden=
searchbuttonlabel=
break=
namespaces=
prefix=
placeholder=
preloadparams[]=
</inputbox>

```

The <tvar|type>*type*</> parameter is mandatory.

All other parameters are optional.

<tvar|preloadparams>*preloadparams[]*</> can appear more than once.

## Box types

The default location of the submit button(s) is below the input box. The submit button can be moved to the right by using the line break parameter to eliminate the line break between the input box and the submit button: **break=no**

Having the submit button to the right is useful for search boxes when search suggestions would otherwise cover up a search button below the search box.

 type=create
 type=comment
 type=commenttitle
 type=move

For <tvar|search2>**type=search2**</> the default location for the search button is to the right.
Currently, it does not seem to be possible to add other parameters to this type of input box.
This search box searches the entire wiki that it is placed on.

<translate>

## Parameters

</translate>

<translate>
Applying <tvar|create>*create*</> to an existing page simply gives the edit page.</translate>
<translate>
In that case <tvar|preload>`preload`</> is ignored.</translate>
<translate>
Applying <tvar|comment>*comment*</> for a new page works.

The texts taken from the <tvar|mediawiki>`MediaWiki:`</> namespace are of course only examples, any existing page can be used for <tvar|editintro>`editintro`</> or <tvar|preload>`preload`</>.</translate>
<translate>
Unfortunately <tvar|preload>`preload`</> does not yet work for the [[<tvar|special>Special:Upload</>|Upload]] summary.

## Alignment

If you want to create an inputbox on the right side of the page, do something like:
</translate>

```
<div style="float:{{dir|{{pagelang}}|left|right}}; width:42em">
<inputbox>
type=create
</inputbox>
</div>

```

<translate>

## Parser function

Using InputBox in a template

In order to create many similar input boxes, InputBox can be used in a template.</translate>
<translate>
However, passing template parameters to InputBox parameters only works if the <tvar|inputbox>`<inputbox>...</inputbox>`</> tag is written as <tvar|inputbox2>`{{#tag:inputbox | ...}}`</> inside the template.

The following example is a template to create a new wiki page from a named template:
</translate>

```
type=create
buttonlabel=<translate><!--T:119--> Create new</translate> {{{1|article}}}
preload={{{2|Template:Article}}} }}

```

<translate>
When instantiating the template, the first parameter gives the item that is created (default: <tvar|article>`article`</>) as spelled out in the button, the second parameter gives the name of the template used to create the item (default: <tvar|template>`Template:Article`</>).

E.g., the code for an input box to create a new project from a project template might look like this:
</translate>

```
{{Template:CreateNew|project|Template:Project}}

```

<translate>

## See also

</translate>

* Extension:Create Page
* Extension:CreateArticle
* Extension:CreateBox
* Extension:PreloaderExtension:Preloader
* Extension:DPL Page Name S/N Maker

OnWikimedia