Module:Datalist: Difference between revisions
From Tsadra Foundation Advanced Contemplative Scholarships
(by SublimeText.Mediawiker) |
(by SublimeText.Mediawiker) |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 5: | Line 5: | ||
local pargs = frame:getParent().args | local pargs = frame:getParent().args | ||
local output = ' | local output = mw.html.create( 'datalist' ) | ||
output | |||
:attr( 'id', pargs[1] ) | |||
for value in string.gmatch(pargs[2], "([^,]+)") do | for value in string.gmatch(pargs[2], "([^,]+)") do | ||
output | output | ||
:tag( 'option' ) | |||
:attr( 'value', value ) | |||
end | end | ||
return output | return output | ||
Latest revision as of 09:37, 29 April 2024
Documentation for this module may be created at Module:Datalist/doc