From 846a69204d0d2e54638f8e08a3052b2316827cab Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 15 May 2008 20:15:32 +0000 Subject: For cfe.type='form', use cfe.option as the command to save the form data i.e. can be used as button name. Modified pages that use 'form' to also use 'option'. git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1122 ab2d0c66-481e-0410-8bed-d214d4d58bed --- lib/viewfunctions.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/viewfunctions.lua') diff --git a/lib/viewfunctions.lua b/lib/viewfunctions.lua index bb6e6ec..801e7e4 100644 --- a/lib/viewfunctions.lua +++ b/lib/viewfunctions.lua @@ -108,7 +108,7 @@ function displayformitem(myitem, name, viewtype) --myitem.type = "select" --myitem.multiple = "true" local tempname = myitem.name - local tempval = myitem.value + local tempval = myitem.value or {} local reverseval = {} for x,val in ipairs(tempval) do reverseval[val] = x @@ -137,7 +137,7 @@ function displayform(myform, order) if not myform then return end if myform.descr then io.write("

" .. string.gsub(myform.descr, "\n", "
") .. "

\n") end if myform.errtxt then io.write("

" .. string.gsub(myform.errtxt, "\n", "
") .. "

\n") end - io.write('
\n') + io.write('\n') io.write('
\n') local reverseorder= {} if order then @@ -155,7 +155,7 @@ function displayform(myform, order) displayformitem(item) end end - io.write('
\n') + io.write('
\n') io.write('
\n') io.write('
') end -- cgit v1.2.3