Extension talk:Page Forms

multi instance template Spreadsheet-style editing
I have multi instance template and have a couple of issues.


 * Date Picker does not seem to work. Is this possible?
 * Can I add PlaceHolder text?
 * The headings are the field name not the title. Is there a way to fix that?
 * Thanks, --Legaulph (talk) 16:53, 1 March 2018 (UTC)


 * The answer to the first two questions is "no", unfortunately. What do you mean by the title? Yaron Koren (talk) 17:01, 1 March 2018 (UTC)


 * The Headings in the top bar |--Legaulph (talk) 17:54, 1 March 2018 (UTC)


 * I don't understand the question, then. Yaron Koren (talk) 18:01, 1 March 2018 (UTC)


 * So if I have

{{{ ! Start date: }}}
 * {{{field
 * start date
 * input type=text
 * mandatory
 * date format=mm/dd/yy
 * Start date: does not show for the heading it displays start date from field name. --Legaulph (talk) 18:16, 1 March 2018 (UTC)


 * Oh, I see. You can set it manually by adding a "|label=" parameter to the field tag. Yaron Koren (talk) 03:24, 2 March 2018 (UTC)
 * That works, Thanks. --Legaulph (talk) 11:55, 5 March 2018 (UTC)

Missing two listboxes... (part 2)
Hello, Sorry to reopen the "Missing two listboxes" topic. Yaron Koren asked «Do you still think "two listboxes" has advantages over "tokens"?"». Yes, I do! The difference between "two listboxes" and "tokens" is the same as between "text with autocomplete" and "combobox". Users prefer to select an item from a list rather than type it. Furthermore, "two listboxes" is better than the "listbox" input because users do not necessarily know that the control key allows to select several values ... So I vote for the introduction of the "two listboxes" input in the "Page Forms" extension. Please do, semantic master, millions (billions ?) of users humbly are asking you. By the way, great job Yaron for all your work! --Megajoule (talk) 15:35, 9 March 2018 (UTC)


 * Thanks, and I'm pretty sure my software doesn't have millions of users. :) What about "two listboxes" vs. "checkboxes"? Yaron Koren (talk) 16:01, 9 March 2018 (UTC)


 * Hmm... Nice try but I'm not sure that "checkboxes" is the most appropriate input if you use "values from category=some category" whereas some category has millions (um, hundreds...) of pages... --Megajoule (talk) 22:27, 9 March 2018 (UTC)


 * I don't understand - would "two listboxes" work with hundreds of values? Yaron Koren (talk) 14:05, 11 March 2018 (UTC)


 * Yes, indeed. I've just tried a "two listboxes" input with 973 pages in the category. And it works perfectly. --Megajoule (talk) 18:00, 14 March 2018 (UTC)


 * Well, I should have worded it better. I'm not surprised that it works, it just seems very unwieldy to have a "two listboxes" input with hundreds of values, where you have to keep scrolling up and down to find different values. Do you really think "two listboxes" is easier to use than either "tokens" or "checkboxes" with that many values? Yaron Koren (talk) 18:18, 14 March 2018 (UTC)


 * The choice in "two listboxes" is restricted, which is often necessary : you can't type a "fanciful" value. And either you can go through the list or you can use the autocompletion field. This option makes it easy to fill a basket. In short, users like it. --Megajoule (talk) 21:42, 14 March 2018 (UTC)--

Oh yeah, I forgot that "two listboxes" had an autocompletion helper feature. Though I should note that in the "tokens" input you can use "existing values only" to prevent users from creating new values. But I'm curious about the last thing you said - "users like it". This is a lot to think about, because as far as I remember you're the first person who has asked for "two listboxes" to come back since it went away around September 2016 (even in the discussion you linked to, the person didn't really seem bothered by the switch to "tokens"). Without getting into too many details, roughly how many people have you heard expressing an opinion on this? Yaron Koren (talk) 00:30, 15 March 2018 (UTC)
 * OK, you convinced me. I'll manage with "tokens" and try to carry out effective change management with my users... Thanks. Megajoule (talk) 08:54, 29 March 2018 (UTC)

Radio button
Hi!

I have big problem with Radio buttons. Imported the Template:Location map from wikipedia, everything work great but selection of multiple maps doesn't work at all.

I was trying all different solutions but nothing seems to work. http://escforumwiki.com/index.php?title=Template:Location_map#User_selection_of_multiple_maps --Tymek1988 (talk) 00:05, 14 March 2018 (UTC)


 * Could you link to a form where the problem can be seen? I don't understand how that page you linked to is related. Yaron Koren (talk) 00:26, 14 March 2018 (UTC)


 * its releted because it shows that it doesn’t work, I don’t get any error message. This how it looks in wikipedia: https://en.wikipedia.org/wiki/Template:Location_map#User_selection_of_multiple_maps and that’s mine: http://escforumwiki.com/index.php?title=Template:Location_map#User_selection_of_multiple_maps--Tymek1988 (talk) 08:53, 14 March 2018 (UTC)


 * Is this a question related to the Page Forms extension? You do have Page Forms installed on your wiki, but it doesn't look like you have any forms defined. Yaron Koren (talk) 16:18, 14 March 2018 (UTC)


 * After little search I found that I need Template:Switcher and MediaWiki:Common.js, still doesn't work tho, but hope I will find the problem soon --Tymek1988 (talk) 22:44, 14 March 2018 (UTC)

TinyMCE
Hi Yaron, hope all is good! I have just installed TinyMCE onto my development server, but I can't seem to figure out how to get it working on the Page Forms. Where do I place the "editor=tinymce"? I have tried in the form, or is it in the backend extension files?

Any help would be appreciated.

Gary --Squeak24 (talk) 11:34, 16 March 2018 (UTC)


 * You have to put in the "field" tag in the form definition - it should work for any textarea input. Yaron Koren (talk) 12:55, 16 March 2018 (UTC)


 * Brilliant, thank you. --Squeak24 (talk) 13:24, 16 March 2018 (UTC)

Default value in a "datetimepicker' or "datepicker" field
Hello, In a previous version of SMW I used  in a "datetimepicker" field or   in a "datepicker" field. It seems it doesn't work anymore: the "#time" parser function is not systematically evaluated:  could be a solution but the time value (H:i) is missing... Megajoule (talk) 08:48, 29 March 2018 (UTC)


 * Sorry about that - I just checked in what I think is a fix for this. Yaron Koren (talk) 17:04, 6 April 2018 (UTC)

"values from concept" only works if $wgPageFormsUseDisplayTitle=false
About this topic: I confirm that "values from concept" doesn't work except if $wgPageFormsUseDisplayTitle is set to false (true by default). Megajoule (talk) 09:44, 29 March 2018 (UTC)

wpRunQuery=true doesn't work in PF 4.3
Using MW 1.29, updated PF to 4.3: wpRunquery=true stops working. Query field is correctly set but query isn't run. Back to 4.21, things run as expected. Steph.


 * Oops - I did change around some variables, forgetting about the "wpRunQuery=true" query string option. I just added a new setting to replace the old one - instead of adding "wpRunQuery=true", you now just need to add "_run" by itself. Sorry about the problem. Yaron Koren (talk) 03:45, 9 April 2018 (UTC)

How to link to form that creates pages in a namespace?
this is for the sidebar. This is the correct link we need to get to: https://gunretort.xyz/index.php/Form:Retort?namespace=Draft

based on the manual... https://www.mediawiki.org/wiki/Extension:Page_Forms/Linking_to_forms#Using_#forminput

...i tried this on a page:

which directed to: https://gunretort.xyz/index.php/Special:FormEdit/Retort?%22namespace=Draft%22

which returned a database error. Not even sure i can use curlies in the sidebar.

i tried this in the sidebar: Form:Retort?namespace=Draft|New Retort

but for some reason, it resolves incorrectly to: Form:Retort%3Fnamespace%3DDraft

Temporarily, i put the entire url into the sidebar: https://gunretort.xyz/index.php/Form:Retort?namespace=Draft

but of course that's not the right way to do it. It has 2 issues:
 * if my domain changes (which it might) this will break.
 * if i have my wiki set to open links in new windows (which i do), then this opens in a new window (which it shouldn't)


 * First of all, it should be "query string=namespace=Draft", not "query string="namespace=Draft" ". But that's not really relevant here, because those instructions are for #forminput; #formlink doesn't have a "namespace" option. Instead, "Draft:" should be added to the page name formula in the form. Yaron Koren (talk) 00:56, 9 April 2018 (UTC)

Based on the manual, i get something like: Where, in the formula, do you put the User-input? Do i have to make this a field in the Template? -Thx PS- Thx for all your development of incredible mediawiki extensions!


 * Thanks! Oh, I thought before that you already had a page name formula, given that you were using #formlink. Since you're not, I think you just need to use #forminput instead of #formlink (and get rid of those quotation marks), and the whole thing will work. Yaron Koren (talk) 02:29, 9 April 2018 (UTC)


 * jw: But i want a link, not an input-box. Isn't #forminput an text-input-box? Are you saying i can put namespace or prefix in the #forminput that's in the form? Or maybe put namespace or prefix in the Save button? -thx


 * If you want a link, then you definitely need a page name formula. See here for one example of a page name formula in use. Yaron Koren (talk) 03:57, 9 April 2018 (UTC)


 * jw: hey, my infotag was pretty close. In your example, i see one input on the 1st screen, where the page-name is entered. I'm not seeing how that one input box gets loaded into the page-name. i the magic might happen in PF_Form.php


 * This works, but not: I made a page called New_Retort. It contains: . That works.


 * Solved. I figured out that your form-wizard makes a form which is self-referential. It puts the form and the forminput which calls that form on the same page. All this time i was trying to create a forminput on another page that points to the form which already contains forminput 8|


 * No page name formula needed.


 * Fyi, if you label a link in your sidebar as "New Page", it will break the sidebar (nothing to do with Extension:Page_Forms).

namespace query parameter doesn't work
https://mydomain.com/index.php/Form:Retort?namespace=Draft

should create a page in the "Draft" namespace, i think. It doesn't.

any fix?


 * See above. Yaron Koren (talk) 01:02, 9 April 2018 (UTC)

Embeding Special:RunQuery on a page is generating an error

 * MediaWiki	1.30.0
 * PHP	7.1.8 (apache2handler)
 * Semantic MediaWiki	2.5.6
 * Page Forms	4.3 (624f2a9) 18:20, 16 January 2018


 * MediaWiki internal error.


 * Original exception: [WsznpY93tCo5DbDx4XRdJwAAAAM] 2018-04-10 16:34:45: Fatal exception of type "MWException"


 * Exception caught inside exception handler.


 * Set $wgShowExceptionDetails = true; at the bottom of LocalSettings.php to show detailed debugging information.


 * Upgraded to PageForms 4.3 and get error

[Ws5Q-Z3aU0dVxecP9WjFDAAAAAU] /index.php/LADR_Downloads_and_Statistics TypeError from line 46 of /app/mediawiki/extensions/SemanticMediaWiki/includes/formatters/MessageFormatter.php: Argument 1 passed to SMW\MessageFormatter::__construct must be an instance of Language, instance of StubUserLang given, called in /app/mediawiki/extensions/SemanticMediaWiki/src/ParserFunctionFactory.php on line 89

Backtrace:

This is still just with the embedded query page -- Legaulph (talk) 18:20, 11 April 2018 (UTC)
 * 1) 0 /app/mediawiki/extensions/SemanticMediaWiki/src/ParserFunctionFactory.php(89): SMW\MessageFormatter->__construct(StubUserLang)
 * 2) 1 /app/mediawiki/extensions/SemanticMediaWiki/src/ParserFunctionFactory.php(291): SMW\ParserFunctionFactory->newAskParserFunction(Parser)
 * 3) 2 /app/mediawiki/includes/parser/Parser.php(3383): SMW\ParserFunctionFactory->SMW\{closure}(Parser, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string)
 * 4) 3 /app/mediawiki/includes/parser/Parser.php(3106): Parser->callParserFunction(PPFrame_DOM, string, array)
 * 5) 4 /app/mediawiki/includes/parser/Preprocessor_DOM.php(1229): Parser->braceSubstitution(array, PPFrame_DOM)
 * 6) 5 /app/mediawiki/includes/parser/Parser.php(2921): PPFrame_DOM->expand(DOMElement, integer)
 * 7) 6 /app/mediawiki/includes/parser/Parser.php(1277): Parser->replaceVariables(string)
 * 8) 7 /app/mediawiki/includes/parser/Parser.php(451): Parser->internalParse(string)
 * 9) 8 /app/mediawiki/includes/content/WikitextContent.php(329): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
 * 10) 9 /app/mediawiki/includes/content/AbstractContent.php(516): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
 * 11) 10 /app/mediawiki/includes/poolcounter/PoolWorkArticleView.php(144): AbstractContent->getParserOutput(Title, integer, ParserOptions)
 * 12) 11 /app/mediawiki/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork
 * 13) 12 /app/mediawiki/includes/page/Article.php(585): PoolCounterWork->execute
 * 14) 13 /app/mediawiki/includes/actions/ViewAction.php(68): Article->view
 * 15) 14 /app/mediawiki/includes/MediaWiki.php(499): ViewAction->show
 * 16) 15 /app/mediawiki/includes/MediaWiki.php(293): MediaWiki->performAction(Article, Title)
 * 17) 16 /app/mediawiki/includes/MediaWiki.php(851): MediaWiki->performRequest
 * 18) 17 /app/mediawiki/includes/MediaWiki.php(523): MediaWiki->main
 * 19) 18 /app/mediawiki/index.php(43): MediaWiki->run
 * 20) 19 {main}


 * Very interesting - that seems like an SMW error. I don't know if I can help with this... Yaron Koren (talk) 18:34, 11 April 2018 (UTC)

What's the index or named-constant for the Form namespace?
PF_NS_FORM. Yaron Koren (talk) 13:20, 11 April 2018 (UTC)

How to use VE in "free text area" when "edit with forms"
Hi Yaron,

When using a form to edit a page there is the option of keeping the "free text" area.

How does one get the form edit page to use Visual Editor for the Free Text area?

ty -Rich


 * There's currently no way to do it, although there might be one coming soon. Yaron Koren (talk) 13:20, 11 April 2018 (UTC)

ok. thanks. Are you following Extension:VEForPageForm? .. any thoughts on weather or not this extension is doing things in a way that Page Forms may someday include? (re: Topic:Ub2nfjjlhm8gfdwq)


 * Yes - that extension's code would most likely be getting used in one way or another. Yaron Koren (talk) 14:33, 11 April 2018 (UTC)