We help IT Professionals succeed at work.
Get Started

Element is undefined in FORM

Shawn asked
Last Modified: 2013-12-24

I am setting up a form that keeps throwing the error "Element is undefined in FORM " once I click on send. Not sure why this is since I set up <cfparam name="form.Title" default=""> at the beginning of the form.

I should mention that I have 2 pages 1. dsp_ to display and an act_ to send us an email if mandatory fields are filled...otherwise it resubmits to itself.

I copied this from another part or our site which works fine.

<cfparam name="form.Title" default="">
<cfparam name="Form.Tr" default="">
<cfparam name="form.Testtext" default="">
<cfparam name="form.Source" default="">
<cfparam name="form.Target" default="">
<cfparam name="form.SourceCurrencyRate" default="">
<cfparam name="form.SourceCurrency" default="">
<cfparam name="form.TranslatorType" default="">
<cfparam name="form.LastName" default="">
<cfparam name="form.FirstName" default="">
<cfparam name="form.email" default="">
<cfparam name="form.company" default="">
<cfparam name="form.Country" default="">
<cfparam name="form.Telephone" default="">
<cfparam name="form.TranslatorStatus" default="">
<cfparam name="form.TranslatorsDiploma" default="">
<cfparam name="form.YearTranslationDiplomaObtained" default="">
<cfparam name="form.YearsTranslating" default="">
<cfparam name="form.CatTool" default="">
<cfparam name="form.CatToolOther" default="">
<cfparam name="form.otherinfo" default="">
<cfif isdefined('form.fullmessage')> 
<p><font color="#FF0000"><strong><cfoutput>#fullmessage#</cfoutput></strong></font></p>
<p>Welcome to Araxi's translation test area. </p>
<FORM action=index.cfm?action=home.ttest-act method=post enctype="multipart/form-data" name="form">
      <input type="Hidden" name="FORMTYPE" value="TranslationTest">
      <cfinclude template="cfformprotect/cffp.cfm">
    <table valign="top" class="submenu"width="90%" border="0" cellspacing="0" cellpadding="5">
        <td height="20" colspan="4" bordercolor="98012E" bgcolor="98012E" class="menu">
<div align="center"><font color="##FFFFFF">Translation 
            Test </font></div></td>
        <td colspan="2" valign="top"><p>Job Reference*</p>
        <td colspan="2" valign="top"><p> 
			<cfif FORM.Tr NEQ "">
              #Tr# <span class="smallbodytext">(to change the reference</span> 
              <a href="<cfoutput>#script_name#?action=home.ttest</cfoutput>" >click 
              here</a><span class="smallbodytext">)</span> 
              <INPUT name="Tr" class=formcell id="Tr"  value=''size=10 maxLength=5>
        <td colspan="2" valign="top">Title</td>
        <td colspan="2" valign="top">Architect comments for client</td>
        <td colspan="2" valign="top"> <p>Job description and instructions</p>
        <td colspan="2" valign="top">goes here</td>
        <td colspan="2" valign="top"><p>Test text</p></td>
        <td colspan="2" valign="top" bordercolor="98012E"> <table width="100%" border="1" valign="top" cellpadding="0" cellspacing="0" bordercolor="98012E">
              <td>this is the test text</td>
        <td colspan="2"><strong>Your Translation</strong><br>
          <span class="smallbodytext">please be sure you have proofed and done 
          a spell check. (stangely this is often overlooked for &quot;quick&quot; 
        <td colspan="2"><TEXTAREA class=formcell name=Testtext rows=5 cols=50></TEXTAREA></td>
        <td colspan="2">&nbsp;</td>
        <td colspan="2">&nbsp;</td>
        <td colspan="2"><p>Source language 
            <select name="Source" size="1" class=formcell id="Source" >
              <cfif isdefined ("form.Source")>
                <cfloop query="getSLang">
                  <option value='#getSLang.Slang#' <cfif getSLang.Slang eq form.Source>selected="true"</cfif>>#getSLang.Slang#</option>
                <option>- select -</option>
                <cfloop query="getSLang">
                  <option value='#getSLang.Slang#'>#getSLang.Slang#</option>
        <td colspan="2">Target language 
          <select name="Target" size="1" class=formcell id="Target" >
            <cfif isdefined ("form.Target")>
              <cfloop query="getTLang">
                <option value='#getTLang.Tlang#' <cfif getTLang.Tlang eq form.Target>selected="true"</cfif>>#getTLang.Tlang#</option>
              <option>- select -</option>
              <cfloop query="getTLang">
                <option value='#getTLang.Tlang#'>#getTLang.Tlang#</option>
          </select> </td>
        <td colspan="2">Your source rate for the job*</td>
        <td colspan="2"><INPUT name=SourceCurrencyRate class=formcell id=SourceCurrencyRate  size=5 
                        maxLength=5> <select name="SourceCurrency" size="1" class=formcell id="SourceCurrency" >
            <option value="USD">USD</option>
            <option value="CAD">CAD</option>
            <option value="EUR">EUR</option>
            <option value="GBP">GBP</option>
        <td height="20" bgcolor="98012E" class="menu" colspan="4"><div align="center"><font color="##FFFFFF">About 
            You </font></div></td>
      <tr bgcolor="##FFFFCC" class="submenuparentlink"> 
        <td valign="bottom">
		<input type="radio" name="Title" value="Mrs" id="Title" >
        <input type="radio" name="Title" value="Ms" id="Title">
        <input type="radio" name="Title" value="M" id="Title">
          Mr </td>
            <input type="radio" name="TranslatorType" value="Independant" id="TranslatorType" >
            Independant <br>
            <input type="radio" name="TranslatorType" value="Group of translators" id="TranslatorType" >
            Group of translators <br>
            <input type="radio" name="TranslatorType" value="Translation Agency" id="TranslatorType" >
            Translation Agency </p></td>
      <tr bgcolor="##FFFFCC"> 
        <td> <INPUT name=LastName class=formcell id=LastName3  size=15 
        <td> <INPUT class=formcell id=company maxLength=30 
                        size=15 name=company></td>
      <tr bgcolor="##FFFFCC"> 
        <TD align="left"> <DIV align=left>First name</DIV></TD>
        <TD align="left" > <INPUT class=formcell id=FirstName 
                        maxLength=30 size=15 name=FirstName></TD>
        <TD align="left">Country*</TD>
        <TD align="left"> <DIV align=left> 
            <INPUT class=formcell id=Country 
                        maxLength=30 size=15 name=Country>
      <tr bgcolor="##FFFFCC"> 
        <TD align="left"> <DIV align=left> 
        <TD align="left" > <INPUT name=email class=formcell id=email  size=15 
                        maxLength=30> </TD>
        <TD align="left">Phone</TD>
        <TD align="left"> <DIV align=left> 
            <INPUT class=formcell maxLength=30 
                        size=15 name=Telephone>
      <tr bgcolor="##FFFFCC"> 
        <TD colspan="2" align="left">Do you have a translator's diploma? </TD>
        <TD colspan="2" align="left"><input type="radio" name="TranslatorsDiploma" value="true" id="TranslatorsDiploma" >
          <input type="radio" name="TranslatorsDiploma" value="false" id="TranslatorsDiploma" >
          no. If yes, year obtained 
          <INPUT name=YearTranslationDiplomaObtained class=formcell id=YearTranslationDiplomaObtained4  size=4 
      <tr bgcolor="##FFFFCC"> 
        <TD colspan="2" align="left">You translate </TD>
        <TD colspan="2" align="left"><input type="radio" name="TranslatorStatus" value="Full Time" id="TranslatorStatus" >
          full time 
          <input type="radio" name="TranslatorStatus" value="Part Time" id="TranslatorStatus" >
          part time </TD>
      <tr bgcolor="##FFFFCC"> 
        <TD colspan="2" align="left">Number of years translating</TD>
        <TD align="left"> <INPUT name=YearsTranslating class=formcell id=YearsTranslating3  size=2 
        <TD align="left">&nbsp;</TD>
      <tr bgcolor="##FFFFCC"> 
        <TD align="left">CAT tools used: </TD>
        <TD align="left" ><br> </TD>
        <TD align="left" valign="top"> <input name="CatTool" type="checkbox" id="CatTool4" value="Deja Vu">
          D&eacute;j&agrave; Vu<br> <input name="CatTool" type="checkbox" id="CatTool4" value="Trados">
          <INPUT name=CatToolOther class=formcell id=CatToolOther  size=15 
        <TD align="left" valign="top"> <input name="CatTool2" type="checkbox" id="CatTool5" value="Wordfast">
          Wordfast<br> <input name="CatTool2" type="checkbox" id="CatTool5" value="OmegaT">
      <tr bgcolor="##FFFFCC"> 
        <TD align="left">Your R&eacute;sum&eacute; or Profile</TD>
        <TD align="left" >&nbsp;</TD>
        <TD colspan="2" align="left"><input name="FILE" type="file" class=formcell id="FILE3"></TD>
      <tr bgcolor="##FFFFCC"> 
        <TD colspan="2" align="left">Other information you wish to give us<br> 
          <span class="smallbodytext"><font class="smalltext">(if you specialise 
          in any areas please specify)</font></span></TD>
        <TD colspan="2" align="left"><TEXTAREA class=formcell name=otherinfo rows=5 cols=50></TEXTAREA></TD>
      <tr bgcolor="##FFFFCC"> 
        <td colspan="4"> <table width="100%" cellspacing="0" cellpadding="0">
              <td class="heading_RED"><p>*mandatory fields</p></td>
              <td align="right"> <INPUT class=button type=submit value=Send name=save> 
    <p>&nbsp; </p>
    <P align=left class="bodytext">Please</P>
    </TD></TR><TR><TD class=bodytext vAlign="top" >&nbsp;</TD></TR></TABLE>
<cfif isdefined('form.save')>
	<cfset continue = true>
   <cfif FORM.Tr EQ "">
    <cfset form.msg1 = " The TestReference field is mandatory.<br>">
    <cfset continue = false>
	<cfset form.msg1 = "">
  <cfif not REFindNocase("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.(([a-z]{2,3})|(aero|coop|info|museum|name))$", FORM.email)>
     <cfset form.msg2 = " A valid E-MAIL address is mandatory.<br>">
    <cfset continue = false>
	<cfset form.msg2 = "">
    <cfif FORM.LastName EQ "">
    <cfset form.msg3 = " Your Name is mandatory.<br>">
    <cfset continue = false>
	<cfset form.msg3 = "">
   <cfif FORM.Country EQ "">
    <cfset form.msg4 = " Your Country is mandatory.<br>">
    <cfset continue = false>
	<cfset form.msg4 = "">
   <cfif FORM.SourceCurrencyRate EQ "">
    <cfset form.msg5 = " Your Rate is mandatory.<br>">
    <cfset continue = false>
	<cfset form.msg5 = "">
	<cfset form.msg5 = "">
  <cfset form.fullmessage = form.msg1 & form.msg2 & form.msg3 & form.msg4 & form.msg5>
   <cfif continue EQ false>      
<cfset Title = FORM.Title>
<cfset Tr = FORM.Tr>
<cfset Testtext = FORM.Testtext>
<cfset Source = FORM.Source>
<cfset Target = FORM.Target>  
<cfset SourceCurrencyRate = FORM.SourceCurrencyRate>
<cfset SourceCurrency = FORM.SourceCurrency>
<cfset TranslatorType = FORM.TranslatorType>
<cfset LastName = FORM.LastName>  
<cfset FirstName = FORM.FirstName>
<cfset email = FORM.email>
<cfset company = FORM.company>
<cfset Country = FORM.Country>
<cfset Telephone = FORM.Telephone>  
<cfset TranslatorStatus = FORM.TranslatorStatus>
<cfset TranslatorsDiploma = FORM.TranslatorsDiploma>
<cfset YearTranslationDiplomaObtained = FORM.YearTranslationDiplomaObtained>
<cfset YearsTranslating = FORM.YearsTranslating>  
<cfset CatTool = FORM.CatTool>
<cfset CatToolOther = FORM.CatToolOther>
<cfset otherinfo = FORM.otherinfo>  
<cfinclude template="dsp_translation_test_#request.language#.cfm">
<cfset Cffp = CreateObject("component","cfformprotect.cffpVerify").init() />
<!--- now we can test the form submission --->
	   <cfdump var=#cffp.testSubmission(form)# />
	   results here
	   <cfdump var=#form#>
<cfif Cffp.testSubmission(form)>
       <!--- The submission has passed the form test.  Place processing here --->
 <!--- email to us giving name of person referring and contacts --->
<cfmail to="webform@araxi.fr" from="website@araxi.fr" subject="translation test. Ref.: #form.TestReference#" type="HTML">
<p>Title: #form.Title#</p> 
<p>TestReference: #form.TestReference#</p>
<p>Testtext: #form.Testtext#</p>
<p>Source: #form.Source#</p>
<p>Target: #form.Target#</p>
<p>SourceCurrencyRate: #form.SourceCurrencyRate#</p>
<p>SourceCurrency: #form.SourceCurrency#</p>
<p>TranslatorType: #form.TranslatorType#</p> 
<p>LastName: #form.LastName#</p> 
<p>FirstName: #form.FirstName#</p> 
<p>email: #form.email#</p> 
<p>company: #form.company#</p> 
<p>Country: #form.Country#</p> 
<p>Telephone: #form.Telephone#</p> 
<p>TranslatorStatus: #form.TranslatorStatus#</p> 
<p>TranslatorsDiploma: #form.TranslatorsDiploma#</p> 
<p>YearTranslationDiplomaObtained: #form.YearTranslationDiplomaObtained#</p> 
<p>YearsTranslating: #form.YearsTranslating#</p> 
<p>CatTool: #form.CatTool#</p> 
<p>CatToolOther: #form.CatToolOther#</p> 
<p>otherinfo: #form.otherinfo#</p> 

Open in new window

Watch Question
Most Valuable Expert 2015
This problem has been solved!
Unlock 1 Answer and 17 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE