Hello. I am getting very frustrated!! I am working with a cfgrid and cfform.
It should be a very simple thing...
Two issues...
One, the first time I submit the form with changes, it doesn't pass the form
field variables. The ChoicesGrid is a empty string. The second time I submit
it with changes it does pass the variables, etc. Every other time it has the
variables to process. I am guessing I am just overlooking a simple thing, but
I just cannot figure it out.
Two, so on the every other time that I actually get form fields, I will
update, let's say, Default_Answer for Choice_ID 52, but in the form fields once
submitted, the Default_Answer does show the update but to another Choice_ID.
See code below... Any help or insight would be appreciated!!! Thanks, Chrissy
<cfform name="Choices">
<cfgrid name="ChoicesGrid" format="html" selectmode="edit"
insert="yes" delete="yes" query="getAllChoicesGrid">
<cfgridcolumn name="Choice_ID" display="no">
<cfgridcolumn name="Choice_Name" header="Choice" display="yes">
<cfgridcolumn name="Choice_Default" header="Default" display="yes">
<cfgridcolumn name="Choice_EarlyFee" header="Early Fee"
display="yes">
<cfgridcolumn name="Choice_Deadline" header="Deadline"
display="yes">
<cfgridcolumn name="Choice_Fee" header="Fee" display="yes">
<cfgridcolumn name="Choice_Order" header="Order" display="yes">
</cfgrid>
<cfinput type="submit" name="Submit" value="Submit">
</cfform>
GArlington - 31 Jan 2008 09:46 GMT
> Hello. I am getting very frustrated!! I am working with a cfgrid and cfform.
> It should be a very simple thing...
[quoted text clipped - 28 lines]
> <cfinput type="submit" name="Submit" value="Submit">
> </cfform>
I suggest look at your generated HTML (Firebug on FF and IE Developer
Toolbar on IE will help you) and you will find the reason.
Change form method to GET (instead of POST) to see which vars are
passed on submit...
Exmachin4 - 01 Feb 2008 00:19 GMT
Never used a cfform/cfgrid before but shouldn't there be a value attribute?
Not sure what your trying to do but it may be easier with a cfform / html from and some queries.
rboudwin - 01 Mar 2008 19:32 GMT
Did you ever resolve your problem? I'm having the exact same issue.
BrianO - 17 May 2008 19:35 GMT
I do not believe insert="yes" is a valid option. Also try:
<cfform name="Choices" format="html" method="post" >