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></> box to Wikinews.
== Example ==
Box for starting a new article.
===Wiki code=== 
<inputbox>
type=create
break=no
</inputbox>
===Result=== 
</translate>
type=create
break=no
== 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 	Example	Description
type=search 	
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 	
type=create	Creates a new page. Information added in the text box is the name of the page which is edited.
type=comment 	
type=comment	Adds a new section to the bottom of the page specified in the text box.
type=commenttitle	
type=commenttitle
page=	default>default=</> parameter. The page has to be specified with <tvar|page>page=</> parameter. Added in <tvar|rev>rev:42703</>.
type=fulltext 	
type=fulltext	rev>rev:45269</>.
type=move 	
type=move
page=	gerrit>gerrit:97559</>.
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. 
Type</translate>	Example
type=search2 	
type=search2
<translate>
== Parameters == 
</translate>
<translate> Parameter</translate> 	<translate> Description</translate> 	<translate> Scope</translate> 	<translate> Compatibility</translate> 	<translate> Example</translate> 	<translate> Result</translate>
bgcolor= 	<translate> Sets the table background color (HTML color values).</translate> <translate> Do not use quotes.</translate> 	<translate> All types</translate> 	? 	<inputbox>
type=search
bgcolor=#eeeeff
</inputbox> 	
type=search
bgcolor=#eeeeff
width= 	<translate> Sets the width of the InputBox in characters.</translate> 	<translate> All types</translate> 	? 	<inputbox>
type=create
width=24
</inputbox> 	
type=create
width=24
default= 	<translate> Default text to put in the InputBox.</translate> 	<translate> All types</translate> 	? 	<inputbox>
type=comment
default=User talk:Eloquence
</inputbox> 	
type=comment
default=User talk:Eloquence
preload= 	1></>) into the blank editbox when a new page is created.</translate> 	create, comment, commentitle 	? 	<inputbox>
type=create
preload=Log
</inputbox> 	
type=create
preload=Log
<translate> Enter the title of a non-existent page in the example InputBox above or below, and click "<tvar|create></>" or "<tvar|new></>" respectively to test this effect.</translate>	<translate> Enter the title of a non-existent page in the example InputBox above or below, and click "<tvar|create></>" or "<tvar|new></>" respectively to test this effect.</translate> 	<translate> Enter the title of a non-existent page in the example InputBox above or below, and click "<tvar|create></>" or "<tvar|new></>" respectively to test this effect.</translate>	<translate> Enter the title of a non-existent page in the example InputBox above or below, and click "<tvar|create></>" or "<tvar|new></>" respectively to test this effect.</translate>	<translate> Enter the title of a non-existent page in the example InputBox above or below, and click "<tvar|create></>" or "<tvar|new></>" respectively to test this effect.</translate>	<translate> Enter the title of a non-existent page in the example InputBox above or below, and click "<tvar|create></>" or "<tvar|new></>" respectively to test this effect.</translate>
editintro= 	<translate> The page which is given under this parameter will be shown, as instructions, above the editing window.</translate> 	create, comment 	? 	<inputbox>
type=comment
editintro=MediaWiki:Missingcommenttext
</inputbox> 	
type=comment
editintro=Mediawiki:Missingcommenttext
buttonlabel= 	<translate> This label will be used for the main button of the form.</translate> 	<translate> All types</translate> 	? 	<inputbox>
type=comment
buttonlabel=Add new rumor
</inputbox> 	
type=comment
buttonlabel=Add new rumor
hidden= 	<translate>
This specifies that there is no InputBox.
It is used with parameter "<tvar|default>default</>", now not being a default, but the fixed value of the name of the page.</translate> 	create, comment 	? 	<inputbox>
type=comment
editintro=Extension:InputBox/editintro comment
preload=Extension:InputBox/preload
hidden=yes
default=Extension talk:InputBox
buttonlabel=<translate><!--T:60--> Post a comment on the talk page</translate>
</inputbox>	
type=comment
editintro=Extension:InputBox/editintro comment
preload=Extension:InputBox/preload
hidden=yes
default=Extension talk:InputBox
buttonlabel=<translate> Post a comment on the talk page</translate>
searchbuttonlabel= 	<translate> This label will be used for the "Search full text" button of the search form.</translate> 	search, fulltext 	? 	<inputbox>
type=search
searchbuttonlabel=<translate><!--T:63--> Dig deeper</translate>
</inputbox> 	
type=search
searchbuttonlabel=<translate> Dig deeper</translate>
fulltextbutton= 	<translate> Show the full text search button on search2 form</translate> 	search2 	? 	<inputbox>
type=search2
searchbuttonlabel=<translate><!--T:66--> Dig deeper</translate>
fulltextbutton=true
</inputbox> 	
type=search
searchbuttonlabel=<translate> Dig deeper</translate>
fulltextbutton=true
labeltext= 	<translate> Text to print beside the button</translate> 	search2 	? 	<inputbox>
type=search2
searchbuttonlabel=<translate><!--T:69--> Dig deeper</translate>
labeltext=<translate><!--T:70--> Look for:</translate> 
</inputbox> 	
type=search2
searchbuttonlabel=<translate> Dig deeper</translate>
labeltext=<translate> Look for:</translate>
break= 	yes>yes</> (use a line break).</translate> 	<translate> All types</translate> 	? 	<inputbox>
type=create
width=24
break=no
</inputbox> 	
type=create
width=24
break=no
namespaces= 	<translate>
Support for namespace checkboxes in fulltext search.
With "<tvar|main>Main**</>", main article namespace is checked by default.</translate> 	search, fulltext 	? 	<inputbox>
type=search
namespaces=Main**,Help
</inputbox> 	
type=search
namespaces=Main**,Help
prefix= 	
<translate>
* Narrow down search to pages beginning with certain prefix.</translate> <translate> Note this only works with certain search back-ends, currently only latest <tvar|lucene-search></>.</translate> <translate> Defaults to empty string (search all pages).</translate>
<translate>
* Create new page beginning with a certain prefix.</translate>
<translate>
* In <tvar|tmove>type=move</>, the prefix is prepended to the default parameter.
Remark: underscores aren't recognized as spaces.
</translate>	search, fulltext, create 	? 	<inputbox>
type=search
prefix={{FULLPAGENAME}}/Archive
</inputbox> 	
type=search
prefix=/Archive
<translate> The button below prefixes the name with <tvar|mypage>Special:Mypage/</>.</translate>
type=create
preload=Template:Article wizard/userpageskeleton
default=new article name here
prefix=Special:Mypage/
editintro=Wikipedia:Article wizard/Wizard-New edit instructions userdraft
buttonlabel=<translate> Create a userspace draft</translate>
width=50
placeholder= 	<translate> Define placeholder text that will display in the input box when it is empty.</translate> 	<translate> All types</translate> 	1.19+ 	<inputbox>
type=search
placeholder=<translate><!--T:88--> Search this Wiki</translate>
</inputbox> 	
type=search
placeholder=<translate> Search this Wiki</translate>
page= 	<translate> Page to posts comment to, or page to move.</translate> 	comment, move 	 	<inputbox>
type=comment
page=Project:Sandbox
</inputbox> 	
type=comment
page=Project:Sandbox
minor= 	<translate> Minor edit.</translate> 	comment, create 	 	<inputbox>
type=comment
page=Project:Sandbox
minor=true
</inputbox> 	
type=comment
page=Project:Sandbox
minor=true
nosummary= 	<translate> Edit summary (headline) not required for new comment.</translate> 	comment 	 	<inputbox>
type=comment
page=Project:Sandbox
nosummary=true
</inputbox> 	
type=create
page=Project:Sandbox
nosummary=true
summary= 	<translate> Edit summary or move reason.</translate> 	create, move 	 	<inputbox>
type=create
default=Special:Mypage/inputbox test
summary=Foo
</inputbox> 	
type=create
default=Special:Mypage/inputbox test
summary=Foo
id= 	form><form></>.</translate> 	<translate> All types</translate> 	<translate> 1.23 for some types</translate> 	<inputbox>
type=comment
page=Project:Sandbox
summary=Foo
id=bar
</inputbox> 	
type=comment
page=Project:Sandbox
summary=Foo
id=bar
inline= 	<translate> Make the InputBox be an inline element (no line break at beginning).</translate> 	search2 	 	<translate><!--T:98--> Text here:</translate> <inputbox>
type=search2
inline=true
width=10
</inputbox> 	<translate> Text here:</translate> 
type=search2
inline=true
width=10
dir= 	<translate> Right to left (rtl) or left to right (ltr).</translate> <translate> Defaults to directionality of the page's language.</translate> 	<translate> All types</translate> 	 	<inputbox>
dir=rtl
type=comment
page=Project:Sandbox
summary=Foo
</inputbox> 	
dir=rtl
type=comment
page=Project:Sandbox
summary=Foo
preloadparams[]= 	man>Manual:Creating pages with preloaded text#Using parameters</>|Creating pages with preloaded text]].</translate> 	create, comment, commentitle 	1.25+ 	<inputbox>
type=create
preload=Log
preloadparams[]=param1
preloadparams[]=param2
</inputbox> 	
type=create
preload=Log
preloadparams[]=param1
preloadparams[]=param2
searchfilter= 	<translate> Specify parameters to append to the search</translate> 	search 	1.30+ 	<inputbox>
type=search
searchfilter=insource:foo
</inputbox> 	
type=search
searchfilter=insource:foo
useve= 	When creating a page the input box will use the new visual editor, if the extension is installed, and this parameter is set to true. Bug remains to be fixed to be able to include the prefix parameter in the string of the page to be created. If the whole path of the page is typed, VE creates it correctly in all spaces.	create, comment 	 	<inputbox>
type=create
break=no
useve=true
</inputbox> 	
type=create
break=no
useve=true
<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>
<inputbox>
type=create
</inputbox>
type=create
<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>
{{#tag:inputbox |
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>
* 
* 
* 
* 
*