Solved

check to see if form has been submitted

Posted on 2008-10-20
8
2,646 Views
Last Modified: 2013-12-24
I am using this to check to see if a form has been submitted when using a image as the button for submit

<cfif IsDefined("Form.save.x")></cfif>

It does not work if i am using a standard HTML button for submit

what do i need to use when using a HTML button.

Thanks

Peter
0
Comment
Question by:CosmicKoder
  • 4
  • 3
8 Comments
 
LVL 8

Accepted Solution

by:
eszaq earned 450 total points
ID: 22761956
<CFIF IsDefined("form.fieldnames")></CFIF>
0
 
LVL 63

Assisted Solution

by:Zvonko
Zvonko earned 50 total points
ID: 22761973
Use only the submit button name.
Like this:

<cfif IsDefined("Form.yourButtonName")>Submitted</cfif>
0
 
LVL 8

Assisted Solution

by:eszaq
eszaq earned 450 total points
ID: 22762024
Zvonko:
Sure, specifying submit button name will work, too. Unless there are multiple submit buttons (to possibly define different action to be performed). Using #form.fieldnames# is more generic and will work every time. Just make sure that form method is "post", not "get" (in which case url variable scope will nedd to be used, of course)
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 22762277
Hello CosmicKoder,
sorry but eszaq is right. He proposed before me the better solution.
The FORM.FieldNames is a variable generated by ColdFusion at EVERY form submit with form method set to POST.
If you do agree I can ask Community Support to open this question for new grading.

0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:CosmicKoder
ID: 22762340
yes i agree, i didnt see his post when i assigned the points. Thanks!
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 22768676
Hello CosmicKoder, please note that your Question is now open again.
You can assign the points to eszaq Answer or split the points to all participiants that helped you. It is up to you.

0
 
LVL 8

Expert Comment

by:eszaq
ID: 22769754
Zvonko:
very noble of you, I can only bow. btw i am not he, i'm a girl
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 22772537
<|:-)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The technique is by far very Simple! How we can export the ColdFusion query results to DOC file?  Well before writing this I researched a lot in Internet but did not found a good Answer anyways!  So i thought now i should share my small snippet w…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

746 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now