aboutsummaryrefslogtreecommitdiffstats
path: root/util/dataforms.lua
diff options
context:
space:
mode:
Diffstat (limited to 'util/dataforms.lua')
-rw-r--r--util/dataforms.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/dataforms.lua b/util/dataforms.lua
index ed62f9b1..b9fd23f2 100644
--- a/util/dataforms.lua
+++ b/util/dataforms.lua
@@ -37,7 +37,7 @@ function form_t.form(layout, data)
-- Add field tag
form:tag("field", { type = field_type, var = field.name, label = field.label });
- local value = data[field.name] or field.value;
+ local value = (data and data[field.name]) or field.value;
-- Add value, depending on type
if field_type == "hidden" then
@@ -106,6 +106,9 @@ field_readers["text-single"] =
field_readers["text-private"] =
field_readers["text-single"];
+field_readers["jid-single"] =
+ field_readers["text-single"];
+
field_readers["text-multi"] =
function (field_tag)
local result = {};