diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-02-28 20:24:12 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-02-28 20:24:12 +0000 |
commit | 63544eda8d5d0c398f21e46c5a6d2b9316126631 (patch) | |
tree | 88299b1a85f8ea0894200375898ab11cd98225dd | |
parent | e3204e0b67de28068b777aa999305ecec0bc5e7c (diff) | |
download | acf-core-63544eda8d5d0c398f21e46c5a6d2b9316126631.tar.bz2 acf-core-63544eda8d5d0c398f21e46c5a6d2b9316126631.tar.xz |
Try using label tag for form inputs
-rw-r--r-- | lib/htmlviewfunctions.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/htmlviewfunctions.lua b/lib/htmlviewfunctions.lua index 00f8871..ff847cd 100644 --- a/lib/htmlviewfunctions.lua +++ b/lib/htmlviewfunctions.lua @@ -71,13 +71,14 @@ function mymodule.displayformitem(myitem, name, viewtype, header_level, group) if not myitem then return end if name then myitem.name = name end if group and group ~= "" then myitem.name = group.."."..myitem.name end + myitem.id = myitem.name if myitem.type ~= "hidden" and myitem.type ~= "group" then io.write("<div class='item") if myitem.errtxt then myitem.class = "error" io.write(" error") end - io.write("'><p class='left'>" .. html.html_escape(myitem.label) .. "</p>") + io.write("'><label class='left' for='"..myitem.name.."'>" .. html.html_escape(myitem.label) .. "</label>") io.write("<div class='right'>") end if (viewtype == "viewonly") then |