--- a/examples/lm/vcard.lua Fri Apr 03 09:26:21 2009 +0300
+++ b/examples/lm/vcard.lua Mon Apr 06 17:21:19 2009 +0300
@@ -72,6 +72,9 @@
function M.add ( form, name, fld )
fld.var = name
fld.index = #form.f + 1
+ if not fld.type then
+ fld.type = 'text-single'
+ end
local obj = form_field.new ( fld )
table.insert ( form.f, obj )
form.f[name] = obj
@@ -92,7 +95,7 @@
if card and card:attribute ( 'xmlns' ) == 'vcard-temp' then
success ( F.parse ( mess:child ( 'vCard' ) ),
function ( form, success, fail )
- iq.send ( conn, from, 'set', form:format ( form, { }, 'submit' ), success, fail )
+ iq.send ( conn, from, 'set', form:format ( { }, 'submit' ), success, fail )
end,
function ( form, success, fail )
success ()