• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Registration

New Here ,
May 21, 2007 May 21, 2007

Copy link to clipboard

Copied

Hi all,

I am fairly well versed in Cf but by no means an expert.

I am writing an App that requires user registration / payment. I have 5 steps:
1. Choose Member Type
2. Create Account
3. Payment
4. Receipt
5. Member CP

Currently I use #step# as my counter. (have tried both session.step and cookie.step)

Basically

<cfform action="register.cfm">
+ Hidden inputs to pass vars


register.cfm

<cfif IsDefined('form.step')>
<cfswitch expression="#session.step#">
<cfcase value="step_1">
<cfset template = "/register/step_1.cfm">
</cfcase>
<cfcase value="v_step_1">
<cfset template = "/register/v_step_1.cfm">
</cfcase>

.....

I am using <cflocation> after each step is validated (v_) to prevent browser refresh and duplicate DB entries.
I am running into difficulties with using session.step and cookie.step

session.step = No expiry and therfore going back creates a problem as the <cfswitch moves the user automatically back to where they left off. (I also use sessions to track user login)

cookie.step = not updating before the <cflocation and thus the same step is repeated over and over

I would like to avoid using url.step

Looking for some suggestions / help / other way of doing it

Cheers


TOPICS
Advanced techniques

Views

190

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
May 30, 2007 May 30, 2007

Copy link to clipboard

Copied

LATEST
I'm not sure you really need session or cookie step. I use similar logic but instead use a hidden form field "step". Another trick I use is a hidden form field "uuid" that is set to a matching value in my session scope. This way, if they do not agree I reset the entire process to the beginning. This prevents the "No expiry" problem you mentioned that can sometimes be duplicated with bookmarks or using the browser history to jump around.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation