Extension talk:InputBox

Jump to navigation Jump to search

About this board

For the page history, see also here. / previous talk on this page


FrugalTPH (talkcontribs)

How would I go about controlling the behavior of the enter key when pressed when a form field has focus in a form?

The default appears to be that it submits the whole form, regardless of which input box is currently focussed.

Quiddity (WMF) (talkcontribs)

I believe that is the only behaviour possible, because it's just showing an HTML form within which that is the standard behaviour.

Reply to "Form field enter key behaviour"

Force inputbox to use Special:Search&profile=all&search=&fulltext=1

2
95.91.246.151 (talkcontribs)

Hi, is it possible to present on a page, exactly what we see when we go to Special:Search&profile=all&search=&fulltext=1 ?

To provide the advanced search options from the beginning, rather than having to first make an empty search?


Ciencia Al Poder (talkcontribs)

No. I suggest you add a link to the special:search page where you want this functionality instead of trying to create a replica of that page on another one.

Reply to "Force inputbox to use Special:Search&profile=all&search=&fulltext=1"
95.174.66.61 (talkcontribs)

Is autocompletion possible in search type InputBox?

Quiddity (WMF) (talkcontribs)
165.225.73.45 (talkcontribs)

Use Case: Build a google-like start page

Reply to "Autocomplete possible?"
Wladek92 (talkcontribs)

Concerning the translation I observe that this page is very well conceived; messages are short and nicely segmented. Translation was fast, fluent, efficient and a real pleasure for me. Thanks all for you work.

inline=true doesn't work

2
Summary by Ciencia Al Poder
2A00:801:70:3:A155:52C6:C8A3:BD40 (talkcontribs)

No matter what I do the "inline=true" doesn't seem to have any effect. It always renders a linebreak regardless. It also seems strange that "labeltext=" isn't allowed on the "create" type...


What I want is an actual labeltext item, that is centered vertically with the input form and button, precisely as it appears in the example for "inline=true".

Ciencia Al Poder (talkcontribs)

Looks like it's a bug. The inline=true only seems to work when the inputbox appears inside a table cell. Otherwise the inputbox is always presented on its own line: test.

Reply to "inline=true doesn't work"
Ahmad252 (talkcontribs)

Hello. Is there any way to create an inputbox with afterfix parameter? For example, I enter "Sandbox" and it guides me to a subpage like "Sandbox/Subpage". Thanks.

Reply to "Afterfix?"
Calebfergie (talkcontribs)

Hi there,


I'm a grad student making a game built on MediaWiki that uses InputBox. Thanks so much for it, I'm new to wiki software and it's exactly what the project needs - especially the 'create' type.

I was wondering if there was a way to make an InputBox that's 'fake'. What I mean is that it automatically navigates to another (existing) page, regardless of what is typed in the box.

I'm having trouble with inputs/forms in MediaWiki and was hoping there was a way to just use InputBox for this purpose.

I'm new to PHP so I'm not confident about modifying the existing extension - so if that's not possible, could you point me to another solution? All the field needs to do is behave like an input (with a button), but route to a page I can specify in the form.


Thanks again for the tool and in advance for any feedback.

Ciencia Al Poder (talkcontribs)

You can use JavaScript for that, which is more flexible.

You can use the type=commenttitle of inputbox to specify a page title, and then with JavaScript, remove the hidden input with name section.

Calebfergie (talkcontribs)

Thanks for getting back to me. This makes sense to me, could you clarify what you mean by "remove the hidden input with name section"?


I see a few hidden inputs within the commentttle form:

  1. <input type="hidden" value="edit" name="action">
  2. <input type="hidden" value="new" name="section">
  3. <input type="hidden" value="Priming Complete" name="title">


Do you mean remove #2?


To clarify, I want the user to go to the view version of the page, not the edit version/action. Is there something else I should change to do this as well?


Calebfergie (talkcontribs)

Update:


I was able to create the intended effect by adding the following JS:

$(function () {$("input[name=action]").remove();}());


Thanks!

RonnieV (talkcontribs)

Is there also a way to tell InputBox to not create a new section (== Section ==), but a subsection (=== Subsection ===)? Thanks in advance, ~~~~

Ciencia Al Poder (talkcontribs)

No, that's currently not possible

Reply to "Creating subsection"
RonnieV (talkcontribs)

I'd like to give a user an option by using an inputbox to start a new section on (the same) page. Using type=commenttitle, the input of the InputBox is available in the URL and will be used as the name for the section. I'm also using a prefill to offer the user a structure to enter (one) more thing. Is there an option to use the content of the Infobox in the prefill-page or in the resulting section?

If not, is it possible to combine two Inputboxes, so that the content of both is available to create a section with, one for the sectionname and one for the content? Thanks in advance, RonnieV (talk) 16:27, 25 February 2019 (UTC)

Reply to "Combining boxes or using input"

Mobile compatibility of preload

2
Summary by Ciencia Al Poder
Trizek (talkcontribs)

While editing a form that uses InputBox, I realized that the form I've created is not preloading anything on the default skin for mobile. The page briefly displays some code and is then replaced by a blank page.

I've tried to see if it was due to my form, but that's not the case.

Ciencia Al Poder (talkcontribs)
Reply to "Mobile compatibility of preload"