Jump to content
MediaWiki

Extension talk:InputBox

Add topic
From mediawiki.org
Archives

Some feature requests

[edit ]
Latest comment: 1 year ago 1 comment1 person in discussion
Parameter Description Scope Notes Example Result Phabricator task
preloadtemplate= Similar to preload= with the difference, that it automatically creates what would otherwise be loaded from, let's say, Template:Example/preload by taking Template:Example's required parameters from the template's TemplateData create needs Extension:TemplateData to work
<inputbox>
preloadtemplate=Template:Example
</inputbox>
T382667
preloadtemplatefilter[]= Overwrites preloadtemplate= so that not the required parameters from template's TemplateData are used but the ones provided by preloadtemplatefilter[]= create needs Extension:TemplateData to work, only works in combination with preloadtemplate=, doesn't work with preloadtemplateparams[]=, defaults to required
<inputbox>
preloadtemplate=Template:Example
preloadtemplatefilter[]=required
</inputbox>

or

<inputbox>
preloadtemplate=Template:Example
preloadtemplatefilter[]=suggested
</inputbox>
T382667
preloadtemplateparams[]= Overwrites preloadtemplate= so that not the required parameters from template's TemplateData are used but the ones provided by preloadtemplateparams[]= create needs Extension:TemplateData to work, only works in combination with preloadtemplate=, doesn't work with preloadtemplatefilter[]=
<inputbox>
preloadtemplate=Template:Example
preloadtemplateparams[]=Faction
preloadtemplateparams[]=Years active
</inputbox>
T382667
preloadparaminputs[]=
or preloadparaminputs=
Similar to preloadparams[]= with the difference, that additional input fields are shown. When Extension:TemplateData is installed, the inputs could differ based on the parameter properties create
<inputbox>
preloadtemplate=Template:Example
preloadparaminputs[]=Faction
preloadparaminputs[]=Rank
</inputbox>

or

<inputbox>
preloadtemplate=Template:Example
preloadparams[]=Faction
preloadparams[]=Rank
preloadparaminputs=true
</inputbox>
T382683
preloadtext=
or preloadinline=
or preloadwikitext=
Similar to preload= with the difference, that, instead of loading wikitext from a separate page, the wikitext can provided right after the parameter create
<inputbox>
preloadtext='''Lorem ipsum''' was a {{{1}}}
</inputbox>

or

<inputbox>
preloadinline='''Lorem ipsum''' was a {{{1}}}
</inputbox>

or

<inputbox>
preloadwikitext='''Lorem ipsum''' was a {{{1}}}
</inputbox>
T382668
preloadcategories[]= Adds categories to create page form, appending it to the content added by preload=, preloadtemplate= or preloadtext= create
<inputbox>
preloadtext=John Doe is the CEO of Acme Corp.
preloadcategories[]=Character
</inputbox>

John Doe is the CEO of Acme Corp.
[[Category:Character]]

T382670
tags[]
or edittags[]=
or changetags[]=
or revisiontags[]=
Adds edit/change/revision tags to the revision after the user creates the article create
<inputbox>
tags[]=mw-inputbox-create
</inputbox>
T382671
slot= When using multi-content revision content models, the page will be edited in single-slot mode and the content from the edit form will be saved into the assigned slot rather than the default slot create only works, when your content model supports multiple slots
<inputbox>
slot=foo
</inputbox>
T382673
createonly Similar to redlink but deactivates the submit button, turns the input's border red and displays a notice below when the page already exists. create
<inputbox>
default=Main page
createonly
</inputbox>
T382675
returnto= Redirects the user to a given page instead of the created article when the user submits the form create
<inputbox>
default=John Doe
returnto=Template:Inbox character/Thanks
</inputbox>
T382676
section= Instead of creating a page, only create a section create
<inputbox>
section=See also
</inputbox>
prependtext=
and appendtext=
Prepends and/or appends text to the page (after saving?) create
<inputbox>
prependtext=The user has written the following into the input form
appendtext=That's what the user has written into the input form
preloadtext=some custom content
</inputbox>

The user has written the following into the input form
That's what the user has written into the input form
some custom content

T382670
titleprepend=
and titleappend=
Prepends and/or appends the user-chosen page title create
<inputbox>
default=Character
namespace=Template
titleprepend=Infobox "
titleappend="
</inputbox>
Template:Infobox "Character" T382677
type=content Uses the input text as content for the edit form rather than the title (might be rendered as a textarea, but that might require something like multiline=yes, displaying an additional input for the title would also be optional here) create
<inputbox>
type=content
</inputbox>
Template:Infobox "Character" T382679

Minilexikon (talk) 15:07, 21 December 2024 (UTC) Reply

Width is not working

[edit ]
Latest comment: 1 year ago 1 comment1 person in discussion

Width parameter is not working in mobile. see R1F4T (talk) 19:49, 26 December 2024 (UTC) Reply

way for new talk page

[edit ]
Latest comment: 1 year ago 1 comment1 person in discussion

section? like I want to be able to specify a page(example: wiki/User_Talk:Twineee) and it will create a section on that page with the title that you entered into the input or even the body. Twineeea (talk) 22:30, 29 December 2024 (UTC) Reply

How to left-align a form

[edit ]
Latest comment: 6 months ago 2 comments2 people in discussion

How to left-align a form generated via <inputbox>? Perohanych (talk) 19:01, 16 February 2025 (UTC) Reply

@Perohanych see https://www.mediawiki.org/wiki/Extension:InputBox#Alignment does this help? Gryllida 11:39, 12 June 2025 (UTC) Reply

how to open in new page

[edit ]
Latest comment: 5 months ago 4 comments2 people in discussion

i have an inputbox to make a new page

how do i make that newly being made page open in a NEW BROWSER TAB

like target=_blank for a link


this should open in a new tab, without closing this page. how? thanks Gryllida 11:35, 12 June 2025 (UTC) Reply

Template:Helpme Gryllida 19:06, 12 June 2025 (UTC) Reply
I have the same question. Did you find any solution?Nimon didarul (talk) 11:40, 3 July 2025 (UTC) Reply
@Gryllida I asked about it in Project:Support desk and got this code. You can add this code to YourUsername/common.js :
mw.hook('wikipage.content').add(()=>{
document.querySelectorAll('.mw-inputbox-form, .mw-inputbox-form-inline').forEach((e)=>{
e.target='_blank';
});
});

Change that selector to .createbox.mw-inputbox-form if you only want to do page-creation inputbox.

Nimon didarul (talk) 08:46, 19 July 2025 (UTC) Reply

Specifying which tab of MediaSearch should open (eg Images or Videos) on Commons

[edit ]
Latest comment: 1 month ago 3 comments2 people in discussion

On Wikimedia Commons, the default MediaSearch search has tabs 'Images', 'Audio', 'Video', 'Other Media', and 'Categories and Pages' where each tab only shows results of that type. Now when using a template that uses InputBox, one should be able to specify which of these tabs to open.

This is best explained with a concrete example: I'd like to change c:Template:Search inside category, a search-box for categories, so that one can specify which of those five tabs to open. This is so that in a category specific to videos like c:Category:Time-lapse videos, the tab that opens when searching is the Videos tab and a category specific to pages like c:Category:Other versions templates, the tab that opens is the Pages and Categories tab.

Without being able to specify the tab, many users will be confused and not find the results. This is needed to make InputBox compatible with the newer MediaSearch. The difference is whether it loads the url with &type=image at the end or e.g. &type=page. Please also let me know if there is any possible workaround for an input box that doesn't use InputBox. Prototyperspective (talk) 19:50, 13 November 2025 (UTC) Reply

@Prototyperspective: In Gerrit change 1174925 for T399476 I'm suggesting we add searchtype = page, with possible values being 'image', 'video', 'audio', 'page', or 'other' (although that patch doesn't actually mandate any, it just passes through whatever you give it). Sam Wilson 21:53, 13 November 2025 (UTC) Reply
Thanks a lot! I didn't remember that a patch was already submitted and also due to Example text in the comment maybe back then I thought it was just for this specific use case of InputBox for searching pages. Looks like that patch would close both issues, great!
I really hope this gets reviewed soon (in the comment on Sep 17 2025 after the patch on Aug 1 2025 you wrote The above patch is ready for review, if anyone's got time.).
Could maybe people watching this page review it please? Prototyperspective (talk) 22:51, 13 November 2025 (UTC) Reply
[edit ]
Latest comment: 12 hours ago 1 comment1 person in discussion

See w:Template talk:Talk header#Note about length of search box. Scroll up to see search boxes there.

Archives (index): 1, 2, 3, 4, 5, 6, 7.Topics inactive beyond 6 months are archived 3 or more at a time by lowercase sigmabot III if there are more than 9.

Concerning the Vector 2022 search box at the top of the Wikipedia w:Main Page and all Wikipedia article pages. Longer search phrases there that go beyond the width of the search box expand just below the search box. So the person entering the search phrase always sees the whole search phrase.

Can that be done somehow with the above search box? --Timeshifter (talk) 07:55, 4 January 2026 (UTC) Reply

AltStyle によって変換されたページ (->オリジナル) /