Skip to main content
Participating Frequently
October 15, 2009
Question

FORM variables missing after post

  • October 15, 2009
  • 4 replies
  • 3938 views

Hi Guys,

I have the most frustrating problem which occurs randomly. It also happens across multiple websites written in different ways.

Firstly here are the specs for my server

Microsoft Server 2008 running IIS 7

Coldfusion 8.0.1 (no hotfixes installed) Standard Edition

JVM ver 1.6.0_04

Form variables are randomly disappearing. I will post the form and sometimes a specific form variable will just not be recognised by the receiving page.

There is no incorrect naming on my part and the forms are set to use post.

Is there some kind of bug in CF 8 which is eating my Form variables.

This topic has been closed for replies.

4 replies

Participating Frequently
October 19, 2009

Thanks for your input guys, I am going to try your suggestions, will update if I find out what it is.

Participating Frequently
October 21, 2009

Well, a little more investigation has revealed that for some reason, when the form is submitted the request is sent as get.

This must surely mean it's a browser problem as I have set the method as post.

I will investigate further and post here what I find.

PS: Browser used was firefox 3.5, will now test in others.

Participating Frequently
October 21, 2009

I am an epic loser!

Apparently I forgot to close one input tag with a / so.

<input type="text" name="captchaCodeStr" id="captchaCodeStr" size="8" maxlength="4" >

Causes some browsers (IE 6 and Firefox tested) to send through the form as a get request.

Doing this stops this from happening.

<input type="text" name="captchaCodeStr" id="captchaCodeStr" size="8" maxlength="4" />

This is the lamest thing that has ever happend to me as a web developer. It is so embarrasing for it to be caused by improper html formatting.

My doctype is set as the following

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

My humblest apologies to the great CF, it was not your fault, you never received the form properly

PS: IE 7 and Chrome functioned perfectly with without the /

Inspiring
October 19, 2009

If you look @ the actual HTTP traffic (via HttpAnalyzer or Firefox's Life HTTP Headers plug-in or something similar), is the form data being passed correctly by the browser?  Or - as Dan suggests - is there more HTTP traffic going on that you're expecting?

I've not heard of any such bug in CF (and everyone would be complaining about it if there was!), so I reckon the bug's more likely to be with your code or web server config or summat like that.

--

Adam

Inspiring
October 15, 2009

Check your webserver logs.  I've seen it happen where right after your page loads, it is requested again, but without a form scope.  I don't know how to fix it, but it might be happening to you.

Inspiring
October 15, 2009

Hi Gerard,

Can you please post your code here?.

Also what happens when you use <cfdump var="#form#"> in the posting page?. Are you able to get all the form scoped variables/values?.