summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2015-10-04 03:07:42 +0000
committerTed Trask <ttrask01@yahoo.com>2015-10-04 03:07:42 +0000
commitbcdfc1ab56199a17c533b18e84f96694b13ce43b (patch)
treeac482926264de1606d40f9e188e6d09a0dcc90c1
parent7751514db730f5b4ef92b40b8ea9295b04c37bba (diff)
downloadacf-core-bcdfc1ab56199a17c533b18e84f96694b13ce43b.tar.bz2
acf-core-bcdfc1ab56199a17c533b18e84f96694b13ce43b.tar.xz
Modify acf_www-controller.handle_clientdata to handle multi data coming in as an array instead of just as a string.
-rw-r--r--app/acf_www-controller.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/acf_www-controller.lua b/app/acf_www-controller.lua
index 1fd16d5..614cd75 100644
--- a/app/acf_www-controller.lua
+++ b/app/acf_www-controller.lua
@@ -625,8 +625,12 @@ mymodule.handle_clientdata = function(form, clientdata)
value.value = {}
if clientdata[name] and clientdata[name] ~= "" then
-- for www we use \r separated list
- for l in string.gmatch(clientdata[name].."\n", "%s*([^\n]*%S)%s*\n") do
- table.insert(value.value, l)
+ if type(clientdata[name]) == "string" then
+ for l in string.gmatch(clientdata[name].."\n", "%s*([^\n]*%S)%s*\n") do
+ table.insert(value.value, l)
+ end
+ else
+ value.value = clientdata[name]
end
end
--[[