+-- Prosody IM
+-- Copyright (C) 2008-2009 Matthew Wild
+-- Copyright (C) 2008-2009 Waqas Hussain
+--
+-- This project is MIT/X11 licensed. Please see the
+-- COPYING file in the source package for more information.
+--
+
local setmetatable = setmetatable;
local pairs, ipairs = pairs, ipairs;
local tostring, type = tostring, type;
-- Add field tag
form:tag("field", { type = field_type, var = field.name, label = field.label });
- local value = data[field.name];
+ local value = data[field.name] or field.value;
-- Add value, depending on type
if field_type == "hidden" then