--- a/examples/forms.lua Fri Apr 03 09:26:21 2009 +0300
+++ b/examples/forms.lua Mon Apr 06 17:21:19 2009 +0300
@@ -26,6 +26,8 @@
elseif action == 'del' then
main.del_completion ( form_cid, id )
forms[id] = nil
+ elseif action == 'add' then
+ form:add( args[3], { value = args[4] } )
elseif action then
local fname, value
if action == 'set' then
@@ -109,6 +111,6 @@
end
end, true, form_cid )
-commands_help['form'] = "[form_id [send | reject | [set] fieldname [value]]]\n\nWithout arguments prints form list.\nWith bare form id prints info on that form.\nWhen setting multivalue field, new values are added, not replacing previous.\nWithout value unsets field, multivalue fields lose all their values."
+commands_help['form'] = "[form_id [send | reject | [set | add] fieldname [value]]]\n\nWithout arguments prints form list.\nWith bare form id prints info on that form.\nWhen setting multivalue field, new values are added, not replacing previous.\nWithout value unsets field, multivalue fields lose all their values.\nAdd command allws to append field to form end.\nNote, that form-specific default type will be used."
-- vim: se ts=4: --