Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Getting Started / January 2007



Tip: Looking for answers? Try searching our database.

Form Error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
numerical07 - 25 Jan 2007 17:14 GMT
Ok im having a strange problem. I have a program that has a user login and
password. on the next page I have a invoke that takes the varibles from the
form and puts them in a arguments varible

--------Below is the first page. when you hit submit, it takes the users login
name and puts it in Form.Userlogin and password and puts that in Form.Password.
---------------

--------------------------------------------------------------------------------
----------------------------------------------

<table width="283">
<cfform action="index.cfm" method="post">
<tr>
       <td width="116">Login Below!</td>
</tr>
<tr>
        <td>Login Name: </td><td width="155"><cfinput type="text"
name="userlogin" required="yes" message="Login Name required"></td>
</tr>
<tr>
         <td>Password: </td><td><cfinput type="password" name="password"
required="yes" message="Password required"></td>
</tr>
<tr>
             <td><cfinput type="submit" name="submit" value="Login"></td>
</tr>
</cfform>
</table>

Index.CFM------------------------ Below is the next
page----------------------------------------------------------------------------
--------------------------------------------------------------------------------
---------------------------------

<cfinvoke component="application" method="verify" returnvariable="UserInfo">
    <cfinvokeargument name="loginName" value="#Form.UserLogin#">
    <cfinvokeargument name="Password" value="#Form.Password#">
</cfinvoke>

-----------------------------Below is the error I get when I run the
application. Once I put in a user name and password, I hit submit , the next
page comes up with this
error---------------------------------------------------------------------------
--------------------------------------------------------------------------------
-------------------

Element USERLOGIN is undefined in FORM.  
 
 
The error occurred in C:\CFusionMX7\wwwroot\evented\index.cfm: line 3
 
1 : <!---<cfif isdefined("session.userid")>
2 : ---><cfinvoke component="application" method="verify"
returnvariable="UserInfo">
3 :     <cfinvokeargument name="loginName" value="#Form.UserLogin#">
4 :     <cfinvokeargument name="Password" value="#Form.Password#">
5 : </cfinvoke>
[CJ] - 25 Jan 2007 17:43 GMT
at the top of index.cfm, can you do: <cfdump var="#form#"><cfabort>?

do you see values in the form scope?
numerical07 - 25 Jan 2007 18:22 GMT
ok when i put <cfdump var="#form#"><cfabort> at the very top of index.cfm. I do
see the Form field names Userlogin, password, and submit. and i see the values
for all of them as well. so it is taking over the values at that point .
A3gis - 29 Jan 2007 05:44 GMT
try cfsetting form.userlogin to some other variable prior to the cfinvoke then use that var in the argument
BKBK - 29 Jan 2007 17:44 GMT
Numerical07,
It is counterproductive to start two threads on the same subject. There are suggestions in http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=2&threadid=1236502.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.