summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2013-11-19 13:43:57 +0000
committerTed Trask <ttrask01@yahoo.com>2013-11-19 13:43:57 +0000
commitae2b55dc0d1059184faeafc81c915ccd4986e3f3 (patch)
tree1bf71d49e84afadc8552942321298efa0d9f2558
parentb529c821c9b20391559a8b46fefb1642391a24de (diff)
downloadacf-lib-ae2b55dc0d1059184faeafc81c915ccd4986e3f3.tar.bz2
acf-lib-ae2b55dc0d1059184faeafc81c915ccd4986e3f3.tar.xz
Modify html generic_input to enumerate a table of values
This fixes bug with weblog converting a multi to hidden for downloadweblog
-rw-r--r--html.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/html.lua b/html.lua
index dceb893..0a9c52a 100644
--- a/html.lua
+++ b/html.lua
@@ -79,11 +79,14 @@ generic_input = function ( field_type, v )
if type(v.value) == "table" then
ret = {}
local vals = v.value
+ local name = v.name
for n, val in ipairs(vals) do
v.value = val
+ v.name = name.."."..n
table.insert(ret, generic_input(field_type, v))
end
v.value = vals
+ v.name = name
return table.concat(ret)
end
if ( field_type == nil ) then