HTML form is sending valid content, but CF script is claiming to receive undefined values-Collection of common programming errors

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’ve verified that the expected values are in the header and I can output the values in the script, but it’s not liking the values for anything beyond output.

This is my HTML:


  
    Email Student Government:

    
    

    Your Email:

Message:

The ColdFusion (including debugging script at top):



    
        #FORM.SEND#
        #FORM.WHO#
        #FORM.FROM#
        #FORM.MESSAGE#
    


    
    Message: #FORM.MESSAGE#
    Date / Time Sent: #dateformat(now(), "yyyy/mm/dd")# at #timeformat(now(), "HH:mm:ss tt")#
    

If I run the script, the logical output is printed, but then this error follows even though the FORM.WHO value is clearly defined and printed just fine in the output directly prior:

Element FORM.WHO is undefined in a CFML structure referenced as part of an expression.

I’m pretty annoyed at what I thought was an easy project so any nudges in the right direction would be greatly appreciated!

PS: I thought the HTML5 input types might be causing issues so I tried trading them for a plain text type, but that didn’t do any good.

  1. The problem isn’t with your form variables, it’s with this:

    #emailHash['FORM.WHO']#

    Your error is saying that that variables doesn’t exist (the rest of the error message should point to the line number that that code is on? You didn’t post that bit…). And from what you’ve posted, there’s no evidence to suggest that it does.

    What goes on in emailHash.cfm?

Originally posted 2013-11-10 00:15:51.