Pass Hidden Field (Rep ID) as Parameter when user logs into site (CFusion)

I have set-up user validation to my site based on a userID and password, but I want to also pass a hidden field/parameter (RepID) to the rest of the site pages so that I can filter my record sets on those pages based on that RepID parameter.
I have coded everything the way I thought it should be, but I'm getting the following error when I test it and from what I can see it is defined...
Element PSWD is undefined in FORM.
Here is the form coding, as well as the CF coding for the user validation...
<form id="login" name="login" method="POST" action="<cfoutput>#MM_loginAction#</cfoutput>">
               <table border="0" cellspacing="0" cellpadding="5">
                 <tr>
                   <td height="35" class="text_bold">Email</td>
                   <td height="35"><label for="email"></label>
                     <input type="text" name="email" id="email" /></td>
                 </tr>
                 <tr>
                   <td height="35" class="text_bold">Password</td>
                   <td height="35"><label for="pswd"></label>
                     <input name="pswd" type="password" id="pswd"  value="<cfoutput>#rsWeblogin#</cfoutput>" /></td>
                 </tr>
                 <tr>
                   <td height="35" class="text_bold"><input  name="salesman_id" type="hidden" id="salesman_id"  value="<cfoutput>#rsWeblogin.SALESMAN_ID#</cfoutput>"  /></td>
                   <td height="35"><input type="submit" name="submit" id="submit" value="Submit" /></td>
                 </tr>
               </table>
             </form>
<cfparam name="FORM.email" default="1">
<cfquery name="rsWeblogin" datasource="INSORB">
SELECT *
FROM dbo.WEBLOGIN
WHERE E_MAIL = <cfqueryparam value="#FORM.email#" cfsqltype="cf_sql_clob" maxlength="64">
</cfquery>
<cfif IsDefined("FORM.email")>
   <cfset MM_redirectLoginSuccess="index.cfm">
   <cfset MM_redirectLoginFailed="login.cfm">
   <cfquery  name="MM_rsUser" datasource="INSORB">
   SELECT E_MAIL,PSWD FROM dbo.WEBLOGIN WHERE E_MAIL=<cfqueryparam  value="#FORM.email#" cfsqltype="cf_sql_clob" maxlength="64"> AND  PSWD=<cfqueryparam value="#FORM.pswd#" cfsqltype="cf_sql_clob"  maxlength="15">
   </cfquery>
   <cfif MM_rsUser.RecordCount NEQ 0>
     <cftry>
       <cflock scope="Session" timeout="30" type="Exclusive">
         <cfset Session.MM_Username=FORM.email>
         <cfset Session.MM_UserAuthorization="">
       </cflock>
       <cfif IsDefined("URL.accessdenied") AND true>
         <cfset MM_redirectLoginSuccess=URL.accessdenied>
       </cfif>
       <cflocation url="#MM_redirectLoginSuccess#" addtoken="no">
       <cfcatch type="Lock">
         <!--- code for handling timeout of cflock --->
       </cfcatch>
     </cftry>
   </cfif>
   <cflocation url="#MM_redirectLoginFailed#" addtoken="no">
   <cfelse>
   <cfset MM_LoginAction=CGI.SCRIPT_NAME>
   <cfif CGI.QUERY_STRING NEQ "">
     <cfset MM_LoginAction=MM_LoginAction & "?" & XMLFormat(CGI.QUERY_STRING)>
   </cfif>
</cfif>
Any help would be greatly appreciated!

The userID and the repID are both unique to the user, but are used for different identification purposes. Both fields are in the same user login table...
I was able to solve the problem by adding <cfset Session.RepID=MM_rsUser.SALESMAN_ID> and adding the SALESMAN_ID field to the <cfquery>
Now it works great!
Thank you for your response!

Similar Messages

  • Pass Hidden Field (Rep ID) as Parameter when user logs into site

    I have set-up user validation to my site based on a userID and password, but I want to also pass a hidden field/parameter (RepID) to the rest of the site pages so that I can filter my record sets on those pages based on that RepID parameter.
    I have coded everything the way I thought it should be, but I'm getting the following error when I test it and from what I can see it is defined...
    Element PSWD is undefined in FORM.
    Here is the form coding, as well as the CF coding for the user validation...
    <form id="login" name="login" method="POST" action="<cfoutput>#MM_loginAction#</cfoutput>">
                    <table border="0" cellspacing="0" cellpadding="5">
                      <tr>
                        <td height="35" class="text_bold">Email</td>
                        <td height="35"><label for="email"></label>
                          <input type="text" name="email" id="email" /></td>
                      </tr>
                      <tr>
                        <td height="35" class="text_bold">Password</td>
                        <td height="35"><label for="pswd"></label>
                          <input name="pswd" type="password" id="pswd"  value="<cfoutput>#rsWeblogin#</cfoutput>" /></td>
                      </tr>
                      <tr>
                        <td height="35" class="text_bold"><input  name="salesman_id" type="hidden" id="salesman_id"  value="<cfoutput>#rsWeblogin.SALESMAN_ID#</cfoutput>"  /></td>
                        <td height="35"><input type="submit" name="submit" id="submit" value="Submit" /></td>
                      </tr>
                    </table>
                  </form>
    <cfparam name="FORM.email" default="1">
    <cfquery name="rsWeblogin" datasource="INSORB">
    SELECT *
    FROM dbo.WEBLOGIN
    WHERE E_MAIL = <cfqueryparam value="#FORM.email#" cfsqltype="cf_sql_clob" maxlength="64">
    </cfquery>
    <cfif IsDefined("FORM.email")>
        <cfset MM_redirectLoginSuccess="index.cfm">
        <cfset MM_redirectLoginFailed="login.cfm">
        <cfquery  name="MM_rsUser" datasource="INSORB">
        SELECT E_MAIL,PSWD FROM dbo.WEBLOGIN WHERE E_MAIL=<cfqueryparam  value="#FORM.email#" cfsqltype="cf_sql_clob" maxlength="64"> AND  PSWD=<cfqueryparam value="#FORM.pswd#" cfsqltype="cf_sql_clob"  maxlength="15">
        </cfquery>
        <cfif MM_rsUser.RecordCount NEQ 0>
          <cftry>
            <cflock scope="Session" timeout="30" type="Exclusive">
              <cfset Session.MM_Username=FORM.email>
              <cfset Session.MM_UserAuthorization="">
            </cflock>
            <cfif IsDefined("URL.accessdenied") AND true>
              <cfset MM_redirectLoginSuccess=URL.accessdenied>
            </cfif>
            <cflocation url="#MM_redirectLoginSuccess#" addtoken="no">
            <cfcatch type="Lock">
              <!--- code for handling timeout of cflock --->
            </cfcatch>
          </cftry>
        </cfif>
        <cflocation url="#MM_redirectLoginFailed#" addtoken="no">
        <cfelse>
        <cfset MM_LoginAction=CGI.SCRIPT_NAME>
        <cfif CGI.QUERY_STRING NEQ "">
          <cfset MM_LoginAction=MM_LoginAction & "?" & XMLFormat(CGI.QUERY_STRING)>
        </cfif>
    </cfif>
    Any help would be greatly appreciated!

    I don't have anything definitive to offer other than a couple of questions based on what I see on your login form:
    1. What is rsWeblogin that you are using to initialize the password field PSWD on the form? I would have expected the password field to be left empty in generating the form...
    2. The use of "#rsWeblogin#" to initialize the PSWD field, coupled with the use of "#rsWeblogin.salesman_ID#" to initialize the hidden field strike me as odd; that second one would lead me to believe rsWeblogin is a structure of some sort, and I'm not sure what you would be getting crunched into the password field as a result...
    Maybe one of those might give you some sort of clue?
    In addition, if the password field is left empty on the form itself, you may well not be getting a FORM.pswd variable coming through the submittal. You may need to either check that it is defined (probably best) or cfparam it to a known value that would never be used for a "real" password (problematic for all sorts of reasons) before using it in the authentication logic.
    /ron

  • Pre populating the database field when a user logs into web forms

    Hi,
    When my users log into the web forms application I want the database name field to be pre populated, how do I do this, I presume it can be defined in the config files ?
    Thanks in anticipation.
    SDG.

    Hi,
    I think u are refering to the username, password, database field (connect string)
    here. If this is the case then you can use LOGON(username, password||'@'||connectstring) procedure and hardcode the connect string.
    Best Regards
    Rajesh Alex

  • Unable to capture trace, when user logs in throuigh Web Interface

    The Trace shows 'No Records Found', when user logs in through Web Interface of CRM. But there is Trace found, when the same user logs in through logon pad and carries out normal actvities.
    sufficient auth. is provided.
    Is there any setting in ST01, through which i can get trace , when user logs in through Web Interface
    Regards

    ST10 traces 1 instance only.
    Your CRM web interface could use another instance than your backend. Go to transaction SM21, choose the appropriate server and run ST10 again.
    Succes!
    Kind regards,
    Lodewijk Borsboom

  • When i log into all my sites needing a password then close browserand reopen browserand i have to log into the site(s) agianevenwhenIsay remember me Ie facebook

    When i log into all my sites needing a password and username for example Facebook and Gmail then i close the browser with "remember me" selected it logs me out of Gmail and Facebook. Then i have to log back into the those sites again. This does not happen to me in Internet Explorer or Google Chrome.
    Firefox seems to save the password and username but logs me out of all my sites that needs a password and username after each session. This never happen to me before an Firefox update.
    The only way that i have found to work around this to keep Firefox open.
    Thanks

    The "remember me" checkbox instructs the site to set a persistent cookie in Firefox. Persistent means that the cookie is marked with a future expiration date so that Firefox retains it between sessions.
    There are a lot of ways to break this. For example:
    * Visit the site in a private window
    * Change Firefox's default setting of accepting persistent cookies from all servers (first party and third party)
    * Set Firefox to clear cookies at shutdown
    * Install add-ons that clear cookies
    * Use external cleaning/security/privacy software that clears Firefox cookies
    If you're not sure about your cookie settings, check out the Privacy panel of the Options dialog:
    orange Firefox button (or Tools menu) > Options > Privacy
    If you have "Firefox will: remember history" then cookies are accepted and retained.
    If you have "Firefox will: use custom settings for history" you can check your cookie settings below that line.
    If you have "Firefox will: never remember history" then you are going to be using full time private browsing and cookies are discarded between sessions.
    If cookie settings are okay, and you would like advice on your extensions, it would be helpful if you could post a list of them. Open the Troubleshooting Information page using either:
    * Help > Troubleshooting Information
    * type or paste about:support in the address bar and press Enter
    In the upper left corner, click the Copy text to clipboard button, then paste into a reply.
    After previewing, you will see there is some extra information below the list of extensions that you can edit out if you like.

  • When i Log into instagram it say my account  is disable but when i log in on another iphone my instagram account log's in. when i try logging into another account it continue to say disable. Why cant i log into instagram or make another one on my iphone?

    When i Log into instagram it say my account  is disable but when i log in on another iphone my instagram account log's in. When i try logging into another account on my phone it continue to say disable. i also tried to make a new instagram on my phone but it wont let me. i deleted the app over and over again but it still wont let me log into any instagram account. Why cant i log into instagram or make another one on my iphone?
    Is is=t possable to have your phone banned from a app forever???
    HELP !!

    I just asked the same thing and did some research. Some people have said  that the UDID code is like banned from instagram, but your account isn't. I'm able to use it on my phone but not on my iPod.

  • Retrieve Novell Username when not logged into Portal

    Hi,
    Is there a way I can store the users Novell username into a variable? This would be done in a report, displayed on the Portal homepage. I require this functionality before the user logs into the portal, so I can't use PORTAL.wwctx_api.get_user.
    Thanks

    Hi,
    IE is sharing the cookies between sessions.
    If you open IE and open another window by clicking <CTRL>+N or menu File >> New Window you have the cookies shared.
    If you open another IE by clicking on the IE icon you will have two seperate IEs which do not share cookies.
    Either you teach your users to use the "logoff" link in the portal header or code a new portal application that automatically destroys the portal cookie when the users leave the portal page...
    Hth,
    Michael

  • How do I change the default Apple ID in my iPad when I log into the App Store?

    I recently changed the email address used for my Apple ID and can no longer update the apps on my iPad.  When I log into the App Store, my discontinued email address continues to show up in the sign-in box despite the fact that I have gone to Settings>Store, signed out of the former email address and logged in using my new Apple ID.  Why does the account information not refresh from the old Apple ID to the new one?

    Try this...
    Close All open Apps... Sign Out of your Account... Perform a Reset and try again.
    Reset
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430

  • I'm trying to verify my apple id but when i log into icloud to get the email it says 'the apple id has not been verifed.' So how do i verify my account if it wont let me log into to icloud mail?

    I'm trying to verify my apple id but when i log into icloud to get the email it says 'the apple id has not been verifed.' So how do i verify my account if it wont let me log into to icloud mail? stressing me out please help me

    You have to respond to the verification email that Apple should have sent to you by clicking the Verify Now link.  Make sure you check the email address you used to set up your iCloud account.  This would not normally be an @icloud.com email address.  Also make sure you check the spam/junk folder as well as the inbox.  If it isn't there, go to https://appleid.apple.com, click Manage your Apple ID, sign in, click on Name, ID and Email addresses on the left, then to the right click Resend under your Primary Email Address to resend the verification email.

  • How can I reset my iPad YouTube password? I can't sign into youtube on iPad. It says Username or password is wrong although both are correct when I log into YouTube account via Google.

    how can I reset my iPad YouTube password? I can't sign into youtube on iPad. It says Username or password is wrong although both are correct when I log into YouTube account via Google. I also tried my husbands youtube login and password and the same outcome. Now I cant log into YouTube via the iPad account. I can log into Youtube via Google however my subscriptions and favorites are all gone. Can I reset the YouTube account located on the iPad? I cant seem to reset the password or delete the app and re-add. I dont want to reset the iPad since I have alot of videos and pictures on it.

    Do you have Google 2 stage authentication turned on?
    If so, you wont't be able to use your normal google password, but will have to instead generate an "application specific" password for the iPad YouTube app in the google security settings section.

  • I have deleted my photos but have icloud. when i log into icloud it doesnt give me an option to view these photos at all. my photo stream is only showing photos from another iphone in the house. i am unsure if i do a restore from back up if this will work

    I have deleted my photos but have icloud. when i log into icloud it doesnt give me an option to view these photos at all. my photo stream is only showing photos from another iphone in the house. i am unsure if i do a restore from back up if this will work. i really dont want to lose these photos but i am very unsure of what to do to resolve. can anyone please help?
    thank you

    If you had Photo Stream enabled with your iCloud account settings on the iPhone, photos in the Camera Roll should have been transferred to your photo steam automatically when the iPhone was connected to an available wi-fi network.
    Your photo stream is not available when logging in with your iCloud account with a browser on a computer.
    Why were the photos in the Camera Roll deleted?
    Photos/videos in the camera roll are included with your iPhones backup. If your iPhone's backup has not been updated since the photos were deleted from the camera roll, you can try restoring your iPhone from the backup.

  • I just got a new iPod and computer, and when I logged into my iTunes account my music and movies were there but my apps were not.  How do I get my apps back

    I just got a new iPod and computer, and when I logged into my iTunes account my music and movies were there but none of my apps were.  How do I get my apps back?

    See:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • I have two iPhones. I just backed up all my photos on my old phone using iCloud but when I log into iCloud on my new iPhone nothing appears? The GB for the photos has been taken from my iCloud allowance so how do I retreive them on the new phone

    I have two iPhones. I just backed up all my photos on my old phone using iCloud but when I log into iCloud on my new iPhone nothing appears? The GB for the photos has been taken from my iCloud allowance so how do I retreive them on the new phone

    if you have a laptop just transfer them that way
    open the iPhone folder then DCIM then copy all photos off your old phone then open iPhone folder for the new phone the DCIM and paste all photos in their

  • How do I fix ? when I log into my yahoo mail the words are so small I cant read it

    Any place else it is fine but about a month ago when I log into my yahoo mail the words are so small I can barley read it. If I go to internet Explorer it is fine but I don't want to use that. It is only in my email.

    Try this :- https://support.mozilla.org/en-US/kb/font-size-and-zoom-increase-size-of-web-pages?esab=a&s=How+to+change+the+size+of+fonts+in+yahoo+mail&r=0&as=s
    This may help you . Let us know if it work !

  • TS3899 Why is the number of e-mails higher on my iPhone than in my e-mail when I log into it on my computer?  The difference between the 2 keeps climbing.

    Why is the number of e-mails higher on my iPhone than in my e-mail when I log into it from my computer?  And how do I fix it?  The number keeps climbing on my phone, making the difference between the two greater.

    You're welcome.
    In order to have the account's Sent mailbox synchronized with the server with the Mail.app on your Mac and with the iPhone's Mail application, you must store the account's Sent mailbox on the server with each. The same applies to the account's Drafts and Trash mailboxes.
    With store sent messages on the server deselected for the account preferences with the Mail.app on your Mac, create an "On My Mac" location mailbox. At the Mail.app menu bar go to Mailbox and select New Mailbox. Choose On My Mac for the mailbox location - which will be stored locally on your computer's hard drive and enter a name for the mailbox. You can name this mailbox MobileMe Sent. Select OK to create the mailbox, which will be available under "On My Mac" in the Mail.app mailboxes drawer.
    Select your MobileMe Sent mailbox. Select a sent message in the mailbox and at the menu bar go to Edit and choose Select All. Follow this - at the Mail.app menu bar go to Message and select Move To and then select the new On My Mac location mailbox in the window provided. This will move all messages from the account's locally stored sent mailbox to the newly created On My Mac location mailbox. When this transfer has been completed, re-select store sent messages on the server for the account preferences.
    Now do the same with the newly created On My Mac location mailbox where all sent messages were transferred to. Select a message in the mailbox and at the menu bar go to Edit > Select All. At the menu bar go to Message > Move To and select your MobileMe account's server stored Sent mailbox under Sent in the window provided. This will transfer all messages stored locally on your computer's hard drive from the newly created "On My Mac" location mailbox to the account's server stored Sent mailbox. These messages will no be available when accessing the account with the iPhone's Mail application.

Maybe you are looking for

  • ISE 1.2 - Multiple NICs/Load Balancing for DHCP Probe

    Hello guys Just prepping an ISE 1.2 patch 8 setup in our organization. I am going for the virtual appliances with multiple NICs. It will be a distributed deployment with 4 x PSNs behind a load balancer and there is no requirement for wireless or gues

  • How do i unlock my Sprint iphone5 with IOS 7.4 0 to use any network here in the U S?

    How can i unlock my Sprint iphone5 with IOS 7.4.0 to be compartable with other service providers here in the U S?

  • Key Field Name not there_Content conversion

    Hello SDN,                I am doing a sender content conversion in send file adapter but i donot have a keyfield and my structure is :- Header,*,body,1 but there is no common field between header and body so i cant use a keyfield . Any solutions ? R

  • Create PDF Error Exception

    Hello, this is the case: I have a Popup with a <af:inlineframe> the source is a Servlet(mapping=pdfRendererServlet). In the Servlet I call an URL(=http://127.0.0.1:7101/EHRCPD_PISA_TT-ViewController-context-root/faces/report.jspx) of the Application

  • Invalid User ID and password for signon - HRMS 9.0 on SQL2005

    I'm installing HRMS 9.0 using MS SQL Server 2005. I ran the "rel849u.sql" and grant.sql scripts. And now I'm at Task 7-4-3 "Updating PeopleTools Database Objects". When I launch the Application Designer, I get the following error when I try to login: