Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8577411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:09:13+00:00 2026-06-11T20:09:13+00:00

I have a simple email form and CF script backing it. It should all

  • 0

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:

<form id="email" name="email" method="post" action="scripts/email.cfm">
  <fieldset>
    <legend>Email Student Government:</legend>

    <!-- PASS NAME (to query email) to the script -->
    <input type="hidden" name="who" id="who" value="Example User">

    <label for="from">Your Email:</label><br>
    <input type="email" id="from" name="from"><br>
    <label for="message">Message:</label><br>
    <textarea id="message" name="message" rows="4"></textarea>
    <input type="submit" name="send" id="send" value="Send Email">
  </fieldset>
</form>

The ColdFusion (including debugging script at top):

<!--- member email addresses, hashed by name --->
<cfinclude template="emailHash.cfm">
    <cfoutput>
        #FORM.SEND#
        #FORM.WHO#
        #FORM.FROM#
        #FORM.MESSAGE#
    </cfoutput>

<cfif isdefined("FORM.SEND") and FORM.SEND eq "Send Email">
    <cfmail from="Example User <example@example.com>" 
            to="#FORM.WHO# <#emailHash['FORM.WHO']#>" 
            bcc="Example User <example@example.com>" 
            replyto="#FORM.FROM#"
            subject="Email Form Submission">
    Message: #FORM.MESSAGE#
    Date / Time Sent: #dateformat(now(), "yyyy/mm/dd")# at #timeformat(now(), "HH:mm:ss tt")#
    </cfmail>
</cfif>

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 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T20:09:15+00:00Added an answer on June 11, 2026 at 8:09 pm

    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?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple php script on my domain that sends me an email:
I have a simple PHP mailer script that takes values from a form submitted
I have a simple PHP script that sends a message to a specified email
i have a simple contact us form and i need to send an email
I have a very simple workflow that is just trying to send an email
I have a couple of simple forms that send an html-only email. Most clients
I have a simple form right now: <form action='<? echo $PHP_SELF;?>' method='POST'> Username:<input type='text'
I have a simple form with basic info e.g. <label>*Name:</label> [inputbox] <label>*email:</label> [inputbox] <label>Company:</label>
I'm working on a simple mobile site that have a registration form for Interest,
I have a simple form with email & password. I want to show the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.