Extension:InputBox/ja

InputBox 拡張機能はあらかじめ作られた HTML フォームをウィキページに追加します. 利用者はボックスにテキストを入力することによってフォームを「埋める」（テキストを入力する、メニュー項目を選択する、等）ことができます.

InputBoxは、当初は Erik Möller によって Wikinews の「記事を作成する」欄を追加するために作成されました.

例
Box for starting a new article.

{|

結果

 * }

一般的な構文
入力ボックスは以下のように構築されます:

type パラメーターは必須です. その他のパラメーターはすべて省略可能です. preloadparams[] can appear more than once.

ボックスの種類
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.

For 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.

パラメーター
Applying create to an existing page simply gives the edit page. In that case  is ignored. Applying comment for a new page works.

The texts taken from the  namespace are of course only examples, any existing page can be used for   or. Unfortunately  does not yet work for the Upload summary.

配置
If you want to create an inputbox on the right side of the page, do something like:





パーサー関数
Using InputBox in a template

In order to create many similar input boxes, InputBox can be used in a template. However, passing template parameters to InputBox parameters only works if the tag is written as   inside the template.

The following example is a template to create a new wiki page from a named template:

When instantiating the template, the first parameter gives the item that is created (default: ) as spelled out in the button, the second parameter gives the name of the template used to create the item (default:  ).

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