diff options
author | Ted Trask <ttrask01@yahoo.com> | 2011-09-12 18:18:14 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2011-11-25 20:55:39 +0000 |
commit | 3ecf576cf27a22b94cea7f7ae166a9e27b76825f (patch) | |
tree | 3b51a7a5c24512522f2e503ae656e2e494e60abc | |
parent | 1150c3708f2c4d995b042e107311c4aa0e89e3d3 (diff) | |
download | acf-core-3ecf576cf27a22b94cea7f7ae166a9e27b76825f.tar.bz2 acf-core-3ecf576cf27a22b94cea7f7ae166a9e27b76825f.tar.xz |
Fix viewfunctions to not modify values
(cherry picked from commit db798e24226b68d98bd658e057fd5d9844518a46)
-rw-r--r-- | lib/viewfunctions.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/viewfunctions.lua b/lib/viewfunctions.lua index d7d25f8..5f923f5 100644 --- a/lib/viewfunctions.lua +++ b/lib/viewfunctions.lua @@ -102,12 +102,16 @@ function displayformitem(myitem, name, viewtype, header_level, group) myitem.name = tempname myitem.value = tempval elseif myitem.type == "boolean" then + local tempval = myitem.value if (myitem.value == true) then myitem.checked = "" end myitem.value = "true" io.write(html.form.checkbox(myitem) .. "\n") + myitem.value = tempval elseif myitem.type == "list" then + local tempval = myitem.value myitem.value = table.concat(myitem.value, "\n") io.write(html.form.longtext(myitem) .. "\n") + myitem.value = tempval else io.write((html.form[myitem.type](myitem) or "") .. "\n") end |