Wikipedia talk:Wikipedia Signpost/2023-01-16/From the archives

Page contents not supported in other languages.
Source: Wikipedia, the free encyclopedia.

Discuss this story

Lua

Could we use Lua to make filling out forms for our featured content candidates easier by, for example, letting people choose which category they want to file the featured content into from a list before starting the nomination? No, probably not. Lua in Scribunto runs during the parsing of the page, it doesn't have any way to interact with the reader. For that sort of thing you'd probably want JavaScript running in the browser. If you really wanted to use Scribunto for it, you'd probably have to have something like

{{subst:Choose featured content category|
<!-- Change "[ ]" to "[x]" for the category you want to select. -->
[ ] Category 1
[ ] Category 2
[ ] etc...
}}

in the edit box and then deal with all the myriad ways someone could manage to screw up that formatting. Or you'd need an entirely different extension that uses Lua in a different manner than Scribunto does. Anomie 14:18, 16 January 2023 (UTC)[reply]