work.
You said, you didn't want to copy all the form data into new hidden fields.
If you meant hand copy, this would do it automatically.
<form ....>
<cfloop collection-"#form#" item="field">
<input type=hidden name=#field# value=#form[field]#>
</cfloop>
<input type=submit value=Continue>
</form>
This will loop through the form structure and copy all fields into new
hidden fields. Be cautious of the fieldnames field, this will create one in
the new form, and then on the action page, all the fields would be named
twice I presume. If you use the fieldnames field on your action page, this
may cause a problem, if so a simple if statement to ignore that one field in
the loop should prevent any problems.
HTH
--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
-----Original Message-----
From: Brad Roberts [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 8:40 AM
To: CF-Talk
Subject: RE: Solution/suggetion...
Here's how I'd do it (if I understand correctly).
Before the user can get to the employee form (to add a new employee), have
them enter the DOB (SSN may be better if that's part of your data). This
would be one page with one form field.
Once they have entered a DOB, query to look up employees that match. If no
employees exist, go to the New Employee form. If employees do exist,
display them and put the continue button at the bottom. Clicking on the
continue button will simply take them to the New Employee form.
Checking the DOB (or SSN) before they input the other criteria will save
them time if the employee already exists. Otherwise, they've typed in all
of the employee info, only to find out it's already in the database.
Hope this makes sence.
-Brad
-----Original Message-----
From: Shahzad.Butt [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 6:43 AM
To: CF-Talk
Subject: Solution/suggetion...
Hi
I am providing user a form to add new employees in the system. Problem
I am facing is that users are adding same employees twice (as adding is
managed by different departments). Now this adding form
(dsp_addEmployee.cfm) is quite complicated and I dont want to touch it
at all neither do I want to touch its act page (act_addEmployee.cfm)
where its acutally adding looking at loads of different criterias.
Solution we came up with is that check the date of birth in the form as
user submits the form and provide the user with list a of all employees
for that date of birth and a message that checks if the employee already
exist. If h/she does then go somewhere (doesn't matter where), if no
then click on CONTINUE and it will run the act page. This CONTINUE seems
a bit tricky as I can have a new page called
dsp_ShowEmployeesForSameDOB.cfm between dsp_addEmployee.cfm and
act_addEmployee. But on continue that dsp_ShowEmployeesForSameDOB.cfm
needs to carry all form variables (attributes here as i am using FB3). I
cannot store them again in hidden variables as its too complicated and
messy.
So whats the solution for this problem?
Thanks
Shaz
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

