{"id":57,"date":"2010-05-04T10:07:41","date_gmt":"2010-05-04T14:07:41","guid":{"rendered":"http:\/\/erics-test-lab.com\/?p=57"},"modified":"2010-05-04T10:07:41","modified_gmt":"2010-05-04T14:07:41","slug":"dumping-form-variables","status":"publish","type":"post","link":"https:\/\/www.esearing.com\/v2010\/2010\/05\/dumping-form-variables\/","title":{"rendered":"dumping form variables"},"content":{"rendered":"<p>Occasionally I need to see the form variables passed from the form to the next page. There are a couple of ways to do it depending on your needs.<\/p>\n<p>CFDump is probably the easiest and outputs the results to a table<br \/>\n<code>cfdump var=\"#Form#\"> <\/code><\/p>\n<p>But I tend to use this one more.  I can put cfif statements inside the loop and control which variables are seen or I can apply data formats (dates, currency, case,etc) based on the fieldname.<br \/>\n<code>&lt;cfoutput><br \/>\n\t&lt;table><br \/>\n\t&lt;CFLOOP index=\"x\" list=\"#FORM.FIELDNAMES#\"><br \/>\n       \t&lt;tr>&lt;td>#x#&lt;\/td>&lt;td>#FORM[x]#&lt;\/td>&lt;\/tr><br \/>\n\t&lt;\/CFLOOP><br \/>\n\t&lt;\/table><br \/>\n\t&lt;\/cfoutput><\/code>  <\/p>\n<p>Note: both will show hidden elements from the form as well as a list of the fieldnames. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Occasionally I need to see the form variables passed from the form to the next page. There are a couple of ways to do it depending on your needs. CFDump is probably the easiest and outputs the results to a &hellip; <a href=\"https:\/\/www.esearing.com\/v2010\/2010\/05\/dumping-form-variables\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,16,24],"tags":[],"class_list":["post-57","post","type-post","status-publish","format-standard","hentry","category-code","category-coldfusion","category-snippets-quick-code-tips-for-single-elements-attributes-or-details"],"_links":{"self":[{"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/posts\/57","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/comments?post=57"}],"version-history":[{"count":0,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/posts\/57\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/media?parent=57"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/categories?post=57"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/tags?post=57"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}