Extension talk:Page Forms

[RESOLVED] No display of a jqplotchart query called from a form
MW 1.35.6 / PHP 7.4.27 / MariaDB 10.1.48 / SMW 3.2.3 / PF 5.3.4

My SearchPeople query form calls the SearchPeople template which contains the following query (which I have simplified for testing):

The request does not succeed (a spinning logo rotates indefinitely) when I go through the form that I also simplified for testing:

Yet the template page does display the graphic.

In a previous version of my MediaWiki system (MW 1.31, SMW 2.5.8, PF 4.3.1), this works (with exactly the same code and more complex form/template duos).

PS1: To see if this changed anything, I switched the type of the form button from GET to POST by changing line 149 in PF_RunQuery.php. Nothing changed.

PS2: Since the upgrade to PF 5.3.4, I also get this type of warning:

I can add the bug in Phabricator if necessary. Megajoule (talk) 11:09, 1 April 2022 (UTC)


 * Do you see any JavaScript errors, if you look in the browser console? To see a clear error message, you may need to add "&debug=true" to the URL. Yaron Koren (talk) 13:12, 1 April 2022 (UTC)


 * In the meantime, I'm debugging the upgrade from SMW 3.2.3 to SMW 4.0.1. which messes up my wiki by blocking all javascript.
 * I've just noticed that the jqplotchart problem and the problems related to the migration to SMW 4.0.1 are naturally solved when I remove the display errors:
 * Does this little # allow SMW 4.0.1 to work and thus the query form leading to a jqplot ask to succeed? I don't know and I don't care (yet). Thank you in any case Yaron for forcing me to go deeper into the debugging. --Megajoule (talk) 21:58, 1 April 2022 (UTC)
 * Does this little # allow SMW 4.0.1 to work and thus the query form leading to a jqplot ask to succeed? I don't know and I don't care (yet). Thank you in any case Yaron for forcing me to go deeper into the debugging. --Megajoule (talk) 21:58, 1 April 2022 (UTC)

editor=wikieditor in a field crashes the form
MW 1.37.2 / PHP 7.4.27 / SMW 4.0.1 / PF 5.3.4

Specifying editor=wikieditor in a textarea field causes the form to crash when trying to create a new page with that form. This is the error message for a form called MyForm:

The form does not crash when modifying a previously created instance.

The problem was not seen with MW1.35.4 and SMW3.2.3

Megajoule (talk) 21:02, 2 April 2022 (UTC)


 * I'm using the same version of MW and PageForms. But I'm not able to see this error while creating a page. Techwizzie (talk) 02:55, 17 April 2022 (UTC)

Embedding query forms broken
All of a sudden embedding query forms does not work any longer "

leads to

Special:RunQuery?pfRunQueryFormName=PageQueryKeyword&PageQueryKeyword[keyword][]=foo+bar&PageQueryKeyword[keyword][is_list]=1&wpRunQuery=&pf_free_text=

The error I am now getting: "You must specify a form name in the URL; the URL should look like "Special:RunQuery/ ".

The form looks like this:

Last time I used this about 4 weeks ago it was still working. In the meantime nothing was updated for the wiki, i.e. it is on MW 1.31.16 and PF 5.0.1. Now updating to PF 5.2.1 did not help. Any suggestions that may help to find out why it is no longer working. 2003:F1:C725:6300:4094:E81D:9963:3FBA 08:34, 12 April 2022 (UTC)


 * Embedding a query form actually works fine for me. It's strange that your URL has Special:RunQuery as (I assume) the name of the page, and not the actual page that the form is embedded in. Why is that, do you know? Yaron Koren (talk) 18:38, 18 April 2022 (UTC)


 * Yes the URL is as posted and not containing the name of the originating page. Since the error message claims that Special:RunQuery should be part of the URL it did not realize that this could be the issue. Still, worked before and not sure why this happens all of a sudden. Now using queryformlink to provide the search though not as nice. --Marbot (talk) 07:30, 20 April 2022 (UTC)

Preload field in free text not working with {{#autoedit:...
On Page Forms master

You can preload data for the free text input which works fine when used with  but it does not seem to work with the   parserfunction.

I tried to figure out what is going wrong but the below simple Form works fine when used with the formlink parserfunction but when used with the autoedit parserfunction the content of the Load autofill page is ignored and does not end up on the created page.



I am not sure if this is on purpose or if there is something wrong. We only used preload for template parameters until now but we want to be able to preload the free text on a page. Thanks and regards, Felipe (talk) 12:40, 12 April 2022 (UTC)


 * I believe it's on purpose, although maybe it's not ideal; parameters like "preload=" and "default=" only apply when creating a new page, not when editing an existing page, and I think that holds true even when using #autoedit. If that's true, then there may be no way to modify the free text from within #autoedit, although there probably should be. Yaron Koren (talk) 18:33, 18 April 2022 (UTC)
 * Hello Yaron, the above applies when generating a new page not an existing one with formlink or autoedit. I understand and agree (we had that discussion in the past) that it does not apply for editing existing pages. To me it seems that autoedit is not "aware" or ignores the standard input|free text field in the form when it automatically generates the new page. It only "looks" in-between the  and   calls. Felipe (talk) 11:18, 21 April 2022 (UTC)

Table Error in textarea field
"|" is not allowed, except within, ..., or special tags



I am getting the above error. My fields are set for textarea.

Not sure if cargo field matters but it is wikitext.

I am using PageForms 5.3.4 and mediawiki 1.35 Thanks, Margaret Issiegainsley (talk) 13:58, 16 April 2022 (UTC)


 * The pipes are used within the template to separate the parameters with their values. Any table added to the parameter like you describe would "break" the template. You can still add tables to to a parameter but you need to replace all the pipes "|" used in the table with the magic word  . See: Help:Magic_words.

Would result in:


 * Felipe (talk) 08:33, 18 April 2022 (UTC)

The combobox fields are not user-friendly
When a value has been previously entered in a combobox field, the list of other possible values is not displayed.

To change the value, the user must delete the old value with the Delete or Backspace keys. The user may then have the impression that it is impossible to change the value.

Megajoule (talk) 08:35, 17 April 2022 (UTC)

Mandatory parameter does not work in combobox
With the last version of Page Forms 5.3.4, the mandatory condition does not apply if input type=combobox. The warning message does not appear and the user can save the form even if the field is blank. An example here. Manu.wikidebats (talk) 18:57, 18 April 2022 (UTC)


 * This was fixed here. Yaron Koren (talk) 17:15, 21 April 2022 (UTC)
 * Thanks! It works. Manu.wikidebats (talk) 21:54, 21 April 2022 (UTC)

Any suggestion to troubleshoot 'autocomplete on URL'?
Hi - I believe I followed all the steps described at this page to set up an external source for autocomplete. I can go to the URL and look up a value manually and the page returns a JSON object that matches what is described in the documentation. Once I am in the form, I am not getting any value using the mapping I defined in LocalSettings. Do you have tips to debug what is going on? I am not seeing any error in the browser console or in the form itself. Lalquier (talk) 20:17, 20 April 2022 (UTC)


 * One thought about it - does Page Form expect a particular Mime Type or header for the JSON content produced by the remote URL? Another possibility is an interference with a single sign on extension we are using. In any case, a way to have some kind of trace or log of what Page Form is doing with autocomplete would be helpful. Lalquier (talk) 22:43, 20 April 2022 (UTC)

Property parameter does not work for combobox
With the last version of Page Forms 5.3.4, property (or values from property) parameter does not work if input type=combobox. No autocompletion applies (but it does for values from category). An example here. Manu.wikidebats (talk) 21:59, 21 April 2022 (UTC)


 * Looks like property values ​​don't like property names with an apostrophe. I took the liberty of doing a test on your wiki with a property with a "more suitable" name (Property:TestAttribut) and it worked. I advise you to rename your attributes and retest. Megajoule (talk) 08:03, 23 April 2022 (UTC)
 * Thanks! Now the titles are displaying... but if they are long, the end of the title is of this kind: A la différence des ordres d'exécution pfe27252df55cf9ac6e3d1f5d512ec765.
 * So, it's still not working :(. Manu.wikidebats (talk) 17:17, 24 April 2022 (UTC)
 * Now it's working. I had to change the property declaration: Has type::Text to Has type::Page.
 * But why? This property does not refer to pages but to text. Manu.wikidebats (talk) 17:32, 24 April 2022 (UTC)
 * Again, I took the liberty of testing on your wiki by changing the type of the page attribute to text (I reset page after my tests...). Indeed, when the value exceeds 72 characters, cryptic characters are displayed after the 40th character. A quick search of the SMW docs shows that there are indeed differences in the treatment of Text and Page types.Can you modify the $smwgFieldTypeFeatures parameter to see if the SMW_FIELDT_CHAR_LONG setting fixes the problem? --Megajoule (talk) 11:27, 27 April 2022 (UTC)

A concrete example of the use of the promising "values dependent on" functionality?
I feel like I'm digging up an old topic but I haven't found a clear answer to this question in the documentation of the Page Forms extension or in the talk archive.

Is there an example of the implementation of the "values dependent on" feature somewhere on the web? My tests didn't give me much and despite what the documentation says, the example given (restaurant, country, city) doesn't shed any light on how this parameter works.

My hidden hope is that this will overcome the current malfunction of the Semantic Forms Select extension. Megajoule (talk) 07:11, 28 April 2022 (UTC)


 * You can see an example here, using this form - the values for "Position" are dependent on the value for "Topic". Thankfully you can modify these values even when logged out. Yaron Koren (talk) 13:58, 28 April 2022 (UTC)
 * OK. Thank you for this example. I have the same type of code except that the form is not multiple and I am not using Cargo but SMW. I have a class instance that registers the City and Country properties. However the choice of country in the form does not show the city...

Template:Restaurant * Country: Country:: Form:Restaurant
 * City : City::

Property:City and Property:Country Has type::Text La Tour d'Argent Megajoule (talk) 07:17, 29 April 2022 (UTC)


 * There may be a bug with the handling of "values dependent on" in SMW - it's been a long time since I tested it. Yaron Koren (talk) 13:14, 29 April 2022 (UTC)

_run table display bug
Adding  onto a query string results in an odd display bug with tables. To reproduce:
 * 1) Click this link
 * 2) Now click "run query" on the same page, and the table difference will be obvious. Frybread (talk) 04:48, 29 April 2022 (UTC)

Combobox - A non-numeric value encountered
I'm not sure if this is an error with my form or an error with PageForms, any ideas on how to remedy (other than not using Comboboxes)? MediaWiki - 1.35.6 PHP - 7.4.25 (cgi-fcgi) MySQL - 8.0.28-0ubuntu0.20.04.3 PageForms 5.4

ErrorException from line 99 of /home/username/website.com/w/extensions/PageForms/includes/forminputs/PF_ComboBoxInput.php: PHP Warning: A non-numeric value encountered TiltedCerebellum (talk) 05:10, 12 May 2022 (UTC)
 * 1) 0 /home/username/website.com/w/extensions/PageForms/includes/forminputs/PF_ComboBoxInput.php(99): MWExceptionHandler::handleError(integer, string, string, integer, array)
 * 2) 1 /home/username/website.com/w/extensions/PageForms/includes/forminputs/PF_ComboBoxInput.php(196): PFComboBoxInput::getHTML(string, string, boolean, boolean, array)
 * 3) 2 /home/username/website.com/w/extensions/PageForms/includes/PF_FormPrinter.php(2042): PFComboBoxInput->getHtmlText
 * 4) 3 /home/username/website.com/w/extensions/PageForms/includes/PF_FormPrinter.php(1408): PFFormPrinter->formFieldHTML(PFFormField, string)
 * 5) 4 /home/username/website.com/w/includes/StubObject.php(116): PFFormPrinter->formHTML(string, boolean, boolean, integer, string, string, NULL, boolean, boolean, boolean, array, User)
 * 6) 5 /home/username/website.com/w/includes/StubObject.php(142): StubObject->_call(string, array)
 * 7) 6 /home/username/website.com/w/extensions/PageForms/includes/PF_AutoeditAPI.php(978): StubObject->__call(string, array)
 * 8) 7 /home/username/website.com/w/extensions/PageForms/includes/PF_AutoeditAPI.php(129): PFAutoeditAPI->doAction
 * 9) 8 /home/username/website.com/w/extensions/PageForms/specials/PF_FormEdit.php(103): PFAutoeditAPI->execute
 * 10) 9 /home/username/website.com/w/extensions/PageForms/specials/PF_FormEdit.php(44): PFFormEdit->printForm(string, string, NULL)
 * 11) 10 /home/username/website.com/w/includes/specialpage/SpecialPage.php(600): PFFormEdit->execute(string)
 * 12) 11 /home/username/website.com/w/includes/specialpage/SpecialPageFactory.php(635): SpecialPage->run(string)
 * 13) 12 /home/username/website.com/w/includes/MediaWiki.php(307): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext)
 * 14) 13 /home/username/website.com/w/includes/MediaWiki.php(945): MediaWiki->performRequest
 * 15) 14 /home/username/website.com/w/includes/MediaWiki.php(548): MediaWiki->main
 * 16) 15 /home/username/website.com/w/index.php(53): MediaWiki->run
 * 17) 16 /home/username/website.com/w/index.php(46): wfIndexMain
 * 18) 17 {main}


 * I figured it out, apparently size must be set to some numeric value, but nowhere is that stated in the docs, nor does it fail gracefully, warn, or have a default. Imo there should be a default to prevent exceptions, or at the very least a warning on save. At some point we had a user change or delete the value, and it kicked this error TiltedCerebellum (talk) 05:20, 12 May 2022 (UTC)
 * "size" doesn't have to be set, although it did lead to a PHP warning if it was set to a non-numeric value (like "50px" instead of "50"). I just checked in a fix for this. Yaron Koren (talk) 13:56, 12 May 2022 (UTC)

Card Suit Symbols in {{#queryformlink:form=|link type=button|link text=&#9824;&#9829;&#9830;&#9827;
I am creating a card game wiki and would like to have the queryformlink button text show card suit symbols (Spades/&#9824;, Hearts/&#9829;, Diamonds/&#9830;, Clubs/&#9827;).

I have tried to use Unicode and HTML-codes for these symbols and also a link to an image. None of these seem to work. (PageForms 5.4, MW 1.35.2). Also I do not see any card suit icons in the OOUI set which would be an option I could live with (assuming I can figure out how to change the button icon from '> next').

Pre OOUI usage this was possible (ie. I can do this in PageForms 4.6).

Am I missing something fundamental that would allow me to have this more user friendly interface?

Thanks in advance, Gregg GMShimokura (talk) 02:35, 13 May 2022 (UTC)


 * That's too bad. I haven't tried this personally, but I can think of two potential approaches: (1) having the links be of the default text type, instead of buttons, and using CSS to make them look more like buttons; or (2) adding some JavaScript (in MediaWiki:Common.js) to change the text on the buttons, after they have already been rendered. Yaron Koren (talk) 03:06, 13 May 2022 (UTC)

Datetimepicker (and combobox), highly criticized by users
I get very negative feedback from my users about the datetimepicker fields. They say that these fields are not at all ergonomic compared to the old version, especially :


 * it is impossible to enter a whole date with the keyboard (e.g. 21/02/2022 17:04)
 * the current date and time is filled in by default when you start filling in the field (including minutes and seconds!), which means that you have to update everything (including minutes and seconds, which the user often has to reset to 00).
 * the delete button on the right of the field is not explicit. Moreover, on the Linux version of Firefox, its width is reduced to a few pixels (you have to aim right).

If we also consider combobox, it is difficult to find advantages to the change to OOUI.

Will a white knight fight this dragon? Megajoule (talk) 13:59, 22 May 2022 (UTC)


 * I admit that the datetimepicker input has some problems (I didn't know about Firefox on Linux). I should note that there's also a "datetime" input type - which is not JavaScript-based, but it might appeal more to your users. What are the problems with "combobox"? Yaron Koren (talk) 14:16, 22 May 2022 (UTC)