Extension talk:Page Forms

weird behaviour with tokens

It’s been a while since the previous time I upgraded so I don't know how long this bug has been around. Page Forms (tested with 5.8 and 5.9.1) now seems to do some funky things with values that are submitted with tokens and 'values from property' [updated]. Instead of a page name for each value, it now saves a combination of what appears to be the display title and the page name between rounded brackets. That breaks a lot of things for me now. Rand(1,2022) (talk) 11:54, 4 July 2025 (UTC)

By "top category", did you mean "values from category"? Also, do you know if this happens with the comobobox input type too, or just with tokens? Yaron Koren (talk) 12:45, 4 July 2025 (UTC)
It's just tokens not comboboxes. More specifically, It happens with 'values from property' when a mapping template is used to control the displaytitle/label. There's another situation I found: 'values from url' is broken in 5.9.1 but if I manually apply the patch from v6, I get the same issue. The Action API output looks fine but something gets changed somewhere along the way (PHP or JS I don't know yet). And forget about the 'top category;; that was a mistake on my part! Rand(1,2022) (talk) 20:53, 4 July 2025 (UTC)
Okay, it sounds like the problem is that the value mapping, which is supposed to only show up in the form, somehow ends up on the generated page as well. Speaking of Page Forms 6.0 - I assume you are not using it because you are still on MW 1.39. But do you see any change to the "values from property" behavior after applying the v6 patch? Yaron Koren (talk) 13:41, 7 July 2025 (UTC)
By the way, we tried this out with Page Forms 6.0 and couldn't reproduce the problem, so maybe it has been fixed. Regardless - whatever value you have $wgPageFormsUseDisplayTitle set to (true or false), you could try setting it to the other value and see if that improves the situation. Yaron Koren (talk) 18:31, 17 July 2025 (UTC)

Autogrow textarea doesn't work on mobile

Have you noticed this? It displays a subset of the existing text but you can't scroll to see it all if there are more than a few lines.

(Pretending to be a mobile on Chrome using F12 is OK as you have cursor keys then...) Jonathan3 (talk) 10:45, 21 July 2025 (UTC)

I agree that scrolling within a textarea on a cell phone or other mobile device can be tricky, but that's not unique to Page Forms, is it? I have an Android phone, where the key is to click on the blue circular cursor thing, and then use that to scroll up and down - that works fine for me. I don't know if iPhones have something similar. Yaron Koren (talk) 16:07, 21 July 2025 (UTC)
I think it is unique to Page Forms, but only with "autogrow".
Without autogrow, holding and moving up/down scrolls the content of the textarea, so that you can then point at it and edit where you have pointed.
With autogrow, the same action moves the whole page. It's as though the autogrow textarea isn't telling the browser that it has text inside it (in layman's terms). Jonathan3 (talk) 16:27, 21 July 2025 (UTC)
I don't know - I just checked, and for me the scrolling behavior seems to be the same with or without "autogrow", using Google Chrome on an Android phone. Are you using an iPhone? Yaron Koren (talk) 16:42, 21 July 2025 (UTC)
Yes, iPhone, using Safari. Jonathan3 (talk) 18:13, 22 July 2025 (UTC)
Okay, I just tried this on an iPhone, with Safari. If I click on the cursor, the cursor moves up and down the textarea, from beginning to end. And if I click on anywhere other than the cursor, the entire textarea moves up and down, which essentially functions the same way, since there's autogrow - moving the form up and down scrolls through all of the text as well, since there's no hidden text. So what is the exact problem you're seeing? Yaron Koren (talk) 21:09, 22 July 2025 (UTC)

Hello, could you please point out how to use the #formredlink parser function for a field contained in a template called via {{#template_display:}}?

This is how my template looks like:

<noinclude> {{#template_params:pagina(label=Pagina)|autore (label=Autore;display=nonempty)|titolo (label=Titolo;display=nonempty)|edizione (label=Edizione;display=nonempty)|luogo (label=Luogo di stampa;display=nonempty)|editore (label=Editore;display=nonempty)|stampatore (label=Stampatore;display=nonempty)|anno (label=Anno di stampa;display=nonempty)|identificativo (label=Identificativo;display=nonempty)|recordSBNedit (label=Record SBN modificato;display=nonempty)|wikibaseItem (label=Wikibase Item;display=nonempty)|supporto (label=Supporto;display=nonempty)|lingua (label=Lingua;display=nonempty)|tipologia (label=Tipologia;display=nonempty)|rifbibled (label=Riferimenti bibliografici sull'edizione;display=nonempty)|volumi (label=Opera in più volumi;display=nonempty)|numvol (label=Numero volumi;display=nonempty)}} <code>{{#cargo_declare:_table=opere|pagina=Page|autore=List (;) of Page|titolo=String|edizione=Text|luogo=List (;) of String|editore=List (;) of String|stampatore=List (;) of String|anno=String|identificativo=URL|recordSBNedit=Boolean (allowed values=Sì,No)|wikibaseItem=URL|supporto=List (,) of String (allowed values=Stampa,Manoscritto)|lingua=List (;) of String|tipologia=List (;) of String|rifbibled=String|volumi=Boolean (allowed values=Sì,No)|numvol=Text}} </noinclude>

<includeonly> {{#cargo_store:_table=opere}} {{#template_display:_format=table}} </includeonly>


I want to add {{#formredlink}} for the field autore, to create pages with the Form:Autore. I should have something like this {{#formredlink:target=|form=Autore}} but I don't know where.


Thanks for any help you can provide! Loman87 (talk) 19:12, 22 July 2025 (UTC)

I think I planned to add a "form=" subparameter to #template_params, so that you could specify the form for any template field, but I never got around to it - so I think you will need to replace that #template_display call with a big actual table to display all 15 fields, unfortunately. (Either that or implement handling for "form=" in the Page Forms code, which would be great.) Yaron Koren (talk) 21:39, 22 July 2025 (UTC)
Actually, I decided this was an important-enough feature that I should add it in already. I just made that addition in the Page Forms code - thankfully it was easy to, requiring adding just two lines to PF_TemplateField.php. If you are running MediaWiki 1.40 or higher, I suggest you just upgrade to the latest Page Forms code. Otherwise, the best thing to do, I think, is manually add those two lines within your own code. Once you've done either of those, I think you just need to change the "autore" part of #template_params to look like autore (label=Autore;display=nonempty;form=Autore). Yaron Koren (talk) 06:31, 23 July 2025 (UTC)
Thanks Yaron, this is wonderful and works perfectly! I wouldn't have beeen able to do it by myself. ~2025-25752-1 Loman87 (talk) 09:33, 24 July 2025 (UTC)