{"id":1307,"date":"2022-08-30T15:15:26","date_gmt":"2022-08-30T15:15:26","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/10\/html-form-is-sending-valid-content-but-cf-script-is-claiming-to-receive-undefined-values-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:15:26","modified_gmt":"2022-08-30T15:15:26","slug":"html-form-is-sending-valid-content-but-cf-script-is-claiming-to-receive-undefined-values-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/html-form-is-sending-valid-content-but-cf-script-is-claiming-to-receive-undefined-values-collection-of-common-programming-errors\/","title":{"rendered":"HTML form is sending valid content, but CF script is claiming to receive undefined values-Collection of common programming errors"},"content":{"rendered":"<p>I have a simple email form and CF script backing it. It should all be obvious, but the script is throwing up with valid input. I&#8217;ve verified that the expected values are in the header and I can output the values in the script, but it&#8217;s not liking the values for anything beyond output.<\/p>\n<p>This is my HTML:<\/p>\n<pre><code>\n  \n    Email Student Government:\n\n    \n    \n\n    Your Email:<br \/>\n    <br \/>\n    Message:<br \/>\n    \n    \n  \n\n<\/code><\/pre>\n<p>The ColdFusion (including debugging script at top):<\/p>\n<pre><code>\n\n    \n        #FORM.SEND#\n        #FORM.WHO#\n        #FORM.FROM#\n        #FORM.MESSAGE#\n    \n\n\n    \n    Message: #FORM.MESSAGE#\n    Date \/ Time Sent: #dateformat(now(), \"yyyy\/mm\/dd\")# at #timeformat(now(), \"HH:mm:ss tt\")#\n    \n\n<\/code><\/pre>\n<p>If I run the script, the logical output is printed, but then this error follows even though the <code>FORM.WHO<\/code> value is clearly defined and printed just fine in the output directly prior:<\/p>\n<pre><code>Element FORM.WHO is undefined in a CFML structure referenced as part of an expression.\n<\/code><\/pre>\n<p>I&#8217;m pretty annoyed at what I thought was an easy project so any nudges in the right direction would be greatly appreciated!<\/p>\n<p>PS: I thought the HTML5 input types might be causing issues so I tried trading them for a plain <code>text<\/code> type, but that didn&#8217;t do any good.<\/p>\n<ol>\n<li>\n<p>The problem isn&#8217;t with your form variables, it&#8217;s with this:<\/p>\n<p><code>#emailHash['FORM.WHO']#<\/code><\/p>\n<p>Your error is saying that <em>that<\/em> variables doesn&#8217;t exist (the rest of the error message should point to the line number that that code is on? You didn&#8217;t post that bit&#8230;). And from what you&#8217;ve posted, there&#8217;s no evidence to suggest that it does.<\/p>\n<p>What goes on in <code>emailHash.cfm<\/code>?<\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-11-10 00:15:51. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I have a simple email form and CF script backing it. It should all be obvious, but the script is throwing up with valid input. I&#8217;ve verified that the expected values are in the header and I can output the values in the script, but it&#8217;s not liking the values for anything beyond output. This [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1307","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1307","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1307"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1307\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1307"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}