Error Resolving Parameter - Cannot figure out the problem

Hello,
  I am working on a registration form and upon testing I am receiving the following error:
Error Diagnostic Information
An error occurred while evaluating the expression:
#form.FirstName1#
Error near line 61, column 24.

I cannot seem to figure out why it's not working, I checked the spelling so I think it must be something simple that I am just missing.  This is what I have on the registration page and below is the code for the action page:
<form action="registration_action_new.cfm" method="post" name="registration_form"><!--- _action --->            
  <tr><td>
   
      <!---First User's name here--->
      <tr><td align="left">First Name</td>
        <td align="right"><input type="text" name="FirstName1" size="25" ></td>
        <td>Last Name</td>
        <td align="right"><input type="text" name="LastName1" size="25" ></td></tr>
        <tr><td></td></tr>
        <!---Second User's name here--->
        <tr><td><font><small>(additional authorized user)</small></font></td></tr>
       <tr><td></td></tr>
        <tr><td align="left"> First Name</td>
        <td align="right"><input type="text" name="FirstName2" size="25" ></td>
        <td>Last Name</td>
        <td align="right"><input type="text" name="LastName2" size="25" ></td>
        </tr>
        <tr><td></td></tr>
        <tr><td colspan="10"><hr /></td></tr>
        <!---Contact Information--->
        <tr><td><b>Contact Information</b></td></tr>
      <tr><td align="left">Address:</td>
        <td align="right"><input type="text" name="Address" size="25" ></td>
        </tr>
        <tr><td align="left">City:</td>
        <td align="right"><input type="text" name="City" size="25" ></td>
       
      <td align="left">State:</td>
        <td align="right"><input type="text" name="State" size="25" ></td>
       
        <td align="left">Zip Code:</td>
        <td ><input type="text" name="Zip" size="5" ></td>
        </tr>
      <tr><td align="left"> Email Address</td>
        <td align="right"><input type="email" name="Email" required="true" validate="email" message="Pleae provide a valid email address" size="25" ></td>
        </tr>          
         <tr>
        <td align="left">Phone</td>
        <td align="right"><input type="text" value="" name="PhoneNumber" size="25" ></td>
        </tr>
       

         
       
    <tr>
       <td> Transaction Type<form method="post" action="registration_action_new.cfm">
       <select size="1" name="transaction">
       <option value="purchase">Purchase</option>
       <option value="sell">Sell</option>
       </select>
       </form>
       
        </tr>
   
     
     
      </table>
                <!---Agent Selection --->
     <cfquery name="getAgents" datasource="teamportals">
                 Select LastName + ' ' + FirstName + ' ' + 'office ' + ' ' + Company AS Agent, Paynum, AssociateCell
              From tblUser
            Where Inactive = '0' AND Role ='agent'
            Order By LastName
                       
     </cfquery>
     Select Agent:&nbsp;&nbsp;  <cfform name="agentlookup" action="registration_action_new.cfm">
           <cfselect name="agentname" query="getAgents" value="Agent" display="Agent" required="yes" multiple="no" size="1" >
        </cfselect>
      <br /><br />
        <input type="submit" name="add_btn" value = "Submit">&nbsp;&nbsp;&nbsp;
        <input type="Reset" name="cancel_btn" value = "  Clear  ">
        </cfform>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
	<title>Home Savings One Registration/Login</title>
</head>


<!---
loop over the past 7 days to get the week_ending value--->

<cfloop index="intOffset" from="0" to="7" step="1">
 
	<!--- Get the WEEKDAY that we want to show. --->
	<cfset dtDay = DateAdd( "d", -intOffset, Now() ) >
	
	<!---
	Output the full date so we can see BOTH the day
	of the week and the day-date.
	--->
	<cfset whichDay = '#DateFormat(dtDay, 'ddd')#'>
	
	<!--- grab the Sunday in the last seven days --->
	<cfif #DateFormat(dtDay, 'ddd')# IS 'Sun'>
		<cfset Myday = #DateFormat(dtDay, 'mm/dd/yy')#>
	</cfif>
	
	
</cfloop>


<!--- 	<cfoutput>#MyDay#</cfoutput> --->

<body leftmargin="0" marginheight="0" marginwidth="0" bottommargin="0" rightmargin="0" topmargin="0"
alink="993399" link="993399" vlink="black">
<table width="100%" border="0" cellpadding="0" cellspacing="0">


	
	<cfset date_added = CreateODBCDate(#dateformat(now(), 'mm/dd/yyyy')#)>
	
	<td valign="top">
    <img src="images/hs1_homeheader_new3.jpg" width="977" height="127" alt="header">

<table align="center">
<tr><td align="center" colspan="6" ><h3>Home Savings One Registration</h3></td></tr>
<tr><td align="center" colspan="6" class="td2a"><cfoutput> #DateFormat(date_added, 'mm/dd/yy')#</cfoutput></td></tr>
<tr><td>&nbsp;</td></tr>
	
	
	
<cfif parameterExists(form.add_btn)>

<cfoutput>

		<cfquery name="addUser" datasource="HSO">
			Insert Into	savings_card
            			(FName1,LName1,FName2,LName2,Address,City,State,Zip,Email,Phone,TransType,Agent,
                        AssociateCell,Affiliation,Rep,DateEntered)
            
            Values		('#form.FirstName1#','#form.LastName1#''#form.FirstName2#',
           				'#form.LastName2#','#form.Address#','#form.City#','#form.state#',
            			'#form.zip#','#form.email#','#form.PhoneNumber#','#form.transaction#',
            			'#form.agent#','#form.AssociateCell#','#form.affiliation#','#form.Rep#',
                        #date_added#)
         </cfquery>
 </cfoutput>
<!--Automated Email-->
 		<cfquery name="getLogin" datasource="HSO">
        	Select	CardNumber,FirstName1,LastName1,Email
            FROM	savings_card
            WHERE	Email='#form.email#'
        </cfquery>
  <cfoutput query="cardNumber">
  	<cfset registrant=#getLogin.FirstName1# + '' + #getLogin.Lastname1#>
    <cfset registrantEmail=#getLogin.email#>
    <cfset cardNumber=#getLogin.CardNumber#>
 </cfoutput>
 
 		<cfmail from="HSO@realestateone.com"
        to="#registrantEmail#"
        subject="Home Savings Registration Confirmation"
        type="html">
        Thank you for registering for your permanent Home Savings One card. You can go into the site to review the directory now (hyperlinked) or come back anytime and login using "#registrant#" with the password "#cardNumber#". Please look for your card to come in the mail within 2 weeks.

Home Savings Support Staff


        </cfmail>
        <br /><br />
        <cfoutput>Thank you for registering for your permanent Home Savings One card. You can go into the site to review the directory now (hyperlinked) or come back anytime and login using "#registrant#" with the password "#cardNumber#". This information will also be emailed to you. Please look for your card to come in the mail within 2 weeks.

Home Savings Support Staff


		</cfoutput>
        </cfif>



</body>
</html>

Open in new window

jdinesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

_agx_Commented:
What's the full error message and when does it occur? When you submit the form?
0
jdinesAuthor Commented:
Error occurred while processing request
An error occurred while evaluating the expression:
#form.firstname1#
Error near line 61 column 24

It occurs when I submit the custreg.cfm form
0
_agx_Commented:
       > <cfif parameterExists(form.add_btn)>

It's because you've got 2 forms with different fields, but the same button name.  So you end up running the same code for both forms.  

Give the buttons different names, so you can perform different actions based on which form was submitted.   Also, parameterExists is deprecated. Use structKeyExists or IsDefined instead.

<cfif structKeyExists(FORM, "nameOfButtonFromFirstForm")>
         process 1st form
<cfelseif structKeyExists(FORM, "nameOfButtonFromSecondForm")>
         process 2nd form
</cfif>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jdinesAuthor Commented:
Thanks your reply helped a great deal
0
_agx_Commented:
Welcome :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.