From ae2b55dc0d1059184faeafc81c915ccd4986e3f3 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Tue, 19 Nov 2013 13:43:57 +0000 Subject: Modify html generic_input to enumerate a table of values This fixes bug with weblog converting a multi to hidden for downloadweblog --- html.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'html.lua') 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 -- cgit v1.2.3