projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b1d4d7f
)
util.dataforms: Small fix to allow generating forms without specifying any input...
author
Matthew Wild
<mwild1@gmail.com>
Sat, 10 Oct 2009 02:09:15 +0000
(
03:09
+0100)
committer
Matthew Wild
<mwild1@gmail.com>
Sat, 10 Oct 2009 02:09:15 +0000
(
03:09
+0100)
util/dataforms.lua
patch
|
blob
|
history
diff --git
a/util/dataforms.lua
b/util/dataforms.lua
index 1619ddc58f391091fd3c1faccc81ccfc40c27512..b9fd23f2e2a0781104b969cfeb609815764f268b 100644
(file)
--- 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