Geen bewerkingssamenvatting |
Geen bewerkingssamenvatting |
||
| Regel 17: | Regel 17: | ||
--[[ | |||
test to show comparison callParserFunction and extensionTag | |||
]] | |||
p.form1 = function(frame) | p.form1 = function(frame) | ||
-- test of frame:callParserFunction | -- test of frame:callParserFunction | ||
| Regel 37: | Regel 39: | ||
local args = { id = 'bla', action = 'get' } | local args = { id = 'bla', action = 'get' } | ||
local str = frame:extensionTag( tag, content, args ) | local str = frame:extensionTag( tag, content, args ) | ||
return str | return str | ||
end | end | ||
return p | return p | ||
Versie van 21 sep 2023 18:20
Module:FF
invoke within form
{{#invoke:FF|input
|type=text
|name=myname
|value=Value here
|id=fff-443434
|class=form-control
|label=Name
|template=Data item
|slot=
|param=
|template=
}}
Please log in first.
Getdata
Kikkers en tongzoenen - Sarah Mlynowski 2007, 1ᵉ druk, Uitgeverij Van Goor Unieboek BV, Houten:
Scriptfout: de functie "getdata" bestaat niet.
- Works with parser function though
Titel/-787178247
- getdatatest
Scriptfout: de functie "getdatatest" bestaat niet.
local p = {}
p.input = function(frame)
local content = frame.args.content or frame.args[1] or ""
local frompage = frame.args.page or ""
local fromslot = frame.args.slot or ""
local additkeys = { content, page, slot }
-- slot
-- Remove anything from args that should not be sent to FF
for v in ipairs( additkeys ) do
frame.args.v = nil
end
-- FF
local str = frame:extensionTag( '_input', content, frame.args )
return str
end
--[[
test to show comparison callParserFunction and extensionTag
]]
p.form1 = function(frame)
-- test of frame:callParserFunction
-- {{#tag:form||id=bla|action=get}}
local content = 'Test'
local formparams = { 'form', content, id = 'bla', action = 'get' }
local str = frame:callParserFunction( '#tag', formparams )
return str
end
--[[
Makes more sense than using callParserFunction
but "equivalent to a call to frame:callParserFunction() with function name '#tag' "
]]--
p.form2 = function(frame)
-- frame:extensionTag( name, content, args )
local content = 'Test'
local tag = 'form'
local args = { id = 'bla', action = 'get' }
local str = frame:extensionTag( tag, content, args )
return str
end
return p
