Solution: cfoutputs don't work in cfmail.
I send an email with cfmail. The email is sent fine. The problem occurs when I add a cfloop in the cfmail to include the extra registrations which could be 0-8.
CODE
<cfif extra gt 0>
<cfloop index="i" from="1" to="#extra#">
<cfset xname = "form.extraName_" & i>
<cfset xemail = "form.extraEmail_" & i>
<cfset xphone = "form.extraPhone_" & i>
<cfoutput>
<p>Extra Registration #i#:<br>
#evaluate(xname)#<br>
#evaluate(xemail)#<br>
#evaluate(xphone)#</p>
</cfoutput>
</cfloop>
</cfif>
<cfloop index="i" from="1" to="#extra#">
<cfset xname = "form.extraName_" & i>
<cfset xemail = "form.extraEmail_" & i>
<cfset xphone = "form.extraPhone_" & i>
<cfoutput>
<p>Extra Registration #i#:<br>
#evaluate(xname)#<br>
#evaluate(xemail)#<br>
#evaluate(xphone)#</p>
</cfoutput>
</cfloop>
</cfif>
I also have <cfparam name="extra" default="0"> up top the page. I use the exact same loop to display the extra registrations on page after submitting and it works fine.
Error:
QUOTE
The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.
Null Pointers are another name for undefined values.
Null Pointers are another name for undefined values.
No line numbers are indicated in the error. If I comment out that loop including the if statement I don't have any problem. I think it might be the evaluates.