Solved

check to see if form has been submitted

Posted on 2008-10-20
8
2,762 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
[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
  • 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
Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

 
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
 

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
What You Need to Know when Searching for a Webhost Provider
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

728 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