<CFFORM> Tag - ColdFusion
>> Return to ColdFusion Tag Index
The <CFFORM> tag allows you ...
<CFFORM> Comments from Macromedia LiveDocs
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p38.htm
There is a workaround for getting <cfform> to use the GET method instead of POST. Use Javascript to set the form's method before it is submitted:
<script language="JavaScript">
function submitHandler(theForm) {
theForm.method = "GET";
}
</script>
<cfform action="foo.cfm" onSubmit="submitHandler(_CF_this);">
...
BTW, jrunrandy said that using "GET" as not best practice. This is incorrect. POST should be used when data on the server is to be changed in some way. GET should be used to simply request data. So, for instance, an address lookup form would use GET, while a user profile page should use POST.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p38.htm
BlueSpline,
I'm sorry to say that I don't know the answer to your question. Do these discussions help?
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/dynamic5.htm
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/dynamic6.htm
Also, I noticed the following "changed in CFMX" note for cfinput (http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-p65.htm):
ColdFusion MX: Changed the cfform tag preserveData attribute behavior: if it is set to True, ColdFusion checks radio and check box values only if their value matches the posted value for the control. (In earlier releases, if the posted value did not match any of the cfinput check boxes or radio buttons for the control, the checked attribute was used.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p38.htm
PreserveData does work on CFselect, but only if the user selects a single option.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p38.htm
Does PreserveData work? I want to use it with checkboxes, I've tried setting it to "yes" and "true" but not held the data when I post the form to itself. Is there something else that I need to do in the individual field to reload the previous value?
I'm sure I've previously tried this with other CFinput tyoes without success.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p38.htm
So since there is no "GET" method for CFFORM, what's the best way to have the form not have to be completely refilled out if the user clicks "BACK" after they are on the next page??
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p38.htm
If you can't easily get your webhost to give you a copy of cfform.js, you can probably steal it from somewhere else.
e.g:
http://example.com/CFIDE/scripts/cfform.js (just find a site running CF)
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p38.htm
PrinceNamor: Using Method="get" places all form variables in the URL string and is not considered to be a best practice. CFFORM simply enforces this best practice.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p38.htm
Why cant u use method="get" in CFForm ?
its a valid in HTML and it is sometimes needed when u need a FORM's to post variables to the URL.
Shouldnt this be considered a "flaw" in the tag as it is supposed to mimic HTML's <form> tag?
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p38.htm
I have added the cfform.js to a scripts folder in my webroot. However I have a selectbox which will not validate as required even though I have it set to required. Any insight on this? All other options in CFform are validating and there is a option to set required on SelectBoxes but it does not work.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p38.htm
hi all.
i am workin with coldfusion-cfgrid .i have added cfgrid and the data is form database.my problem is ,i want to add a column to grid not from the database in the same grid..plz give me a reply
reguards
surej
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p38.htm
I forgot to add: This is a known enhancement request.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p38.htm
No you can not.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p38.htm
Can I use "method=get" with CFFORM?
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p38.htm
I think this has to do with needing to copy /CFIDE/scripts/cfform.js to your new web server. Check out http://www.macromedia.com/support/coldfusion/ts/documents/cfform_multihomed.htm for more details.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p38.htm
I transfered sites from one server to another server. Ever since, all the Submit buttons on all <cfforms> are throwing an error.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p38.htm
There is a hotfix for cfform, available at http://www.macromedia.com/support/coldfusion/ts/documents/cfform_hotfix.htm
The fix contains an updated JAR file that resolves the following issues with the cfform applets:
* Required fields in cfform / cfinput are not processed in the order they are defined within the form.
* When more than one image is specified for cftreeitem, the first specified image is displayed for all levels.
* Using cftree and cftreeitem throws Java ClassCastException error.
[Top]
Recommended Books
COLDFUSION MX Web Application Construction Kit (5th Edition)
Authors: Ben Forta and Nate Weiss
1500 pages
[Top]
Web Sites
Macromedia
The makers of ColdFusion/ColdFusion MX.
ColdFusion Developer's Journal
Forta.com (ColdFusion Section)
Ben Forta is Macromedia's Senior Technical Evangelist. Here on his site find useful ColdFusion information.
Flash CFM
Flash and ColdFusion Development.
Handling file uploads without CFFILE
BLOG post by "Sam" on REWINDLIFE.COM gives insight into how to upload a file on your site if you are not allowed to use the CFFILE tag.
[Top]
Copyright © 2003- 2008, Orville Paul Chomer, All Rights Reserved
Home Page
Blog
How To
Chomer TV
The Show
Webcam Videos
Freeware
•
VB Mahjongg
Coding
•
ColdFusion
•
Javascript
•
Visual Basic
Other Places
Acoustic Eidolon
History Singers
Scobleizer
Beach Walks
Freshtopia
CSS Zen Garden