Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to place multiple forms in ond coldfusion templete..

Posted on 2004-09-02
6
Medium Priority
?
185 Views
Last Modified: 2013-12-24
I was wondering what is the best practice if i have a function which requires 2 Forms several querys and
1 insert...

Here is my flow

user sees inital form and enters customer id and submits query
    - query is executed to see if valid customer
if valid customer we display new form with e-mail address field
   -if invalid we displa an error
if cusomer submits new form, we will execute a inset query...

i have done this with parameterexists and checked what submit the user pushed. is there a cleaner way to do this ?
0
Comment
Question by:AlexPonnath
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 21

Expert Comment

by:pinaldave
ID: 11969098
Hi AlexPonnath,
 user sees inital form and enters customer id and submits query
     - query is executed to see if valid customer
 if valid customer we display new form with e-mail address field
    -if invalid we displa an error
 if cusomer submits new form, we will execute a inset query...
Looks effcient already. There are only five step anyway.
Well, what else you are thinking of that could be done. As we do not know much of the requirement what to suggest.
If above mentioned is the flow then it is fine.

Though the questions is that ... what happens if the user comes to second page directly due to any reason... is that possible...
what about database... do you have any identity or unique field... which may conflict...
(if valid customer do not know/fogot its id or login info  - this may be irrelivent here...may be)


Regards,
---Pinal
0
 
LVL 35

Accepted Solution

by:
mrichmon earned 1500 total points
ID: 11969171
The best practice is to display only one form.

Just have cold fusion render the form differently depending on the user action and then have the action page determine if an insert or edit is needed and execute the corresponding action.
0
 
LVL 17

Expert Comment

by:anandkp
ID: 11970361
I wld say just have one form - with customer id & e-mail address [agree with mrichmon]
so the user submits once - u query just once ... no issues at all - the user is happy & so are u ;)

thou - have javascript for validating ur ID & email address - so u cld do the basic validations at client side itself & dont make the user go back & forth for silly typos.

K'Rgds
Anand
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 12202795
Is there more of an answer that you wanted?
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question