Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7089505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:55:47+00:00 2026-05-28T07:55:47+00:00

I have these form values I’m trying capture in a session: prop_zip prop_st address

  • 0

I have these form values I’m trying capture in a session:

prop_zip
prop_st
address
city
fname
lname
email
pri_phone_1
pri_phone_2
pri_phone_3

Here is my session code:

<cfapplication name="qsErrorVals" clientmanagement="yes" sessionmanagement="yes" sessiontimeout="#createTimeSpan(0,0,360,0)#">
<cflock timeout="120" name="#session.sessionID#" type="exclusive">
    <cfset session.prop_st="#prop_st#">
    <cfset session.prop_zip="#prop_zip#">
    <cfset session.address="#address#">
    <cfset session.fname="#fname#">
    <cfset session.lname="#lname#">
    <cfset session.email="#email#">
    <cfset session.pri_phone_1="#pri_phone_1#">
    <cfset session.pri_phone_2="#pri_phone_2#">
    <cfset session.pri_phone_3="#pri_phone_3#">  
</cflock>

So far, I can only save two of the variables from the form:

prop_zip
prop_st

The rest I’m having trouble with saving the form values to the session. I’ve defined the variables I want to store in the session before creating the session and I’ve tried using this code:

<cfset session.email="#form.email#">
etc...

Still I can only save the two variables I mentioned. What am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:55:48+00:00Added an answer on May 28, 2026 at 7:55 am

    It’s difficult to answer specifically without looking at all of your code but hopefully this example will help.

    • The cfapplication tag should go in an Application.cfm or Application.cfc file.
    • The session code should most likely be placed in another file.
    • I’d recommend specifying a scope attribute of session in the cflock tag.

    Application.cfm file:

    <cfapplication name="qsErrorVals" clientmanagement="yes" sessionmanagement="yes" sessiontimeout="#createTimeSpan(0,0,360,0)#">
    

    ErrorVals.cfm or whatever you want to call the file:

    <cfparam name="form.prop_st" default="NY" > <!--- I've added default data for testing --->
    <cfparam name="form.prop_zip" default="12345" >
    <cfparam name="form.address" default="1st Main St." >
    <cfparam name="form.fname" default="John" >
    <cfparam name="form.lname" default="Doe" >
    <cfparam name="form.email" default="me@domain.com" >
    <cfparam name="form.pri_phone_1" default="123-123-1234" >
    <cfparam name="form.pri_phone_2" default="123-123-1234" >
    <cfparam name="form.pri_phone_3" default="123-123-1234" >
    <cfscript>
        prop_st = trim(form.prop_st); // validate, trim, etc.
        prop_zip = trim(form.prop_zip);
        address = trim(form.address );
        fname = trim(form.fname );
        lname = trim(form.lname );
        email = trim(form.email);
        pri_phone_1 = trim(form.pri_phone_1);
        pri_phone_2 = trim(form.pri_phone_2);
        pri_phone_3 = trim(form.pri_phone_3);
    </cfscript>
    
    <cflock scope="session" type="exclusive" timeout="10" >
        <cfset session.prop_st = prop_st>
        <cfset session.prop_zip = prop_zip>
        <cfset session.address= address>
        <cfset session.fname= fname>
        <cfset session.lname= lname>
        <cfset session.email= email>
        <cfset session.pri_phone_1= pri_phone_1>
        <cfset session.pri_phone_2= pri_phone_2>
        <cfset session.pri_phone_3= pri_phone_3>  
    </cflock>
    
    <cfdump var="#session#">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a rails model that validates uniqueness of 2 form values. If these
I have a form (that consists of 25+ fields) and the values for these
I have QTabWidget on my form and two tabs on it. These tabs have
I have a dijit.form.NumberTextBox input field that starts out with these parms: new dijit.form.NumberTextBox({
I have a form that shows results from a database query, these results can
I have two forms, form A and form B. These forms must differ in
I have a search form with default values. As the user loades the page,
I have Ajax file in which code has written to accept values form user
I am facing a problem storing original values of a form. I have a
I have a form that has values prefilled for usability/hints - unfortunately one of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.