I see a cflocation in your code for the action page.

When you cflocate back to the form page you lose your form variables.
This is why they don't display for you.  The cfparam, in this case, will
stop any errors, but it won't magically keep your values.

The easiest (but not only) way to do what you want is to have only one
page, with the form posting to itself.  Pseudo-Code and additional
explanation follows.

*** pseudo code ***

<cfparam name="errorMessage" default="">
<cfif not structisempty(form)>

  ... process action elements here ...

  <cfif user name already exists>
    <cfset message = "Message">
  </cfif>

</cfif>

<cfif len(trim(message)) GT 0>
  Display Message Here, Above the form
</cfif>
.. display form here...

*** END pseudo code ***

Then you could either follow previous advice and cfparam all your
formfields, or you could embed some conditional logic in your formfields
directly.

<cfparam name="form.UserFirstName" default="">
<input name="UserFirstName" type="text"
  value="#form.UserFirstName#"
  size="15" maxlength="25">

or

<input name="UserFirstName" type="text"
  size="15" maxlength="25"
   <cfif isdefined("form.userfirstname")>
      value="#form.userFirstName#"
   </cfif>
>

-P
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to