Ask a Question related to Macromedia ColdFusion, Design and Development.
-
want-a-be #1
Array question for input fields
:confused; Can you have an array for a input name field. For example:
<input type="hidden" name="passID[cnt]" value="#id#">
<input type="text" name="passingThis[cnt]" value="#DB_value#">
I read a DB table displaying the data on the screen and they can change a
couple of different fields for each of the records. All the records fields I
want with the same name so I can just go thru the array and update the DB. I
can display an array value fine in the calling program, but once I go to the
called program, it gives me an error.
Variable PASSINGTHIS is undefined.
The error occurred in
E:\inetpub\wwwroot\telecom\maintenance\EquipmentMa inList_PMUpdate.cfm: line 1
1 : <cfoutput>#passingThis[1]#</cfoutput>
I do have the cnt variable starting at 1 and going until no more records are
listed. I even hardcoded the cnt at 1.
I look at my debug and the value is listed:
Form Fields:
FIELDNAMES=TESTHOLD[1],TESTHOLD[2],PASSINGTHIS[1],HOLDRECCNT,P_ID(1),P_SCHEDULE(
1),P_SCHEDULEMONTH(1),P_LASTMAINTDATE1,P_ID(2),P_S CHEDULE(2),P_SCHEDULEMONTH(2),
P_LASTMAINTDATE2,P_ID(3),P_SCHEDULE(3),P_SCHEDULEM ONTH(3),P_LASTMAINTDATE3,P_ID(
4),P_SCHEDULE(4),P_SCHEDULEMONTH(4),P_LASTMAINTDAT E4,SUBMITPM
HOLDRECCNT=4
PASSINGTHIS[1]=Yes it passed
Any help would be great. Thanks.
want-a-be Guest
-
Create Dynamic PDF with input fields
Hi, I have conclude the way to built a dynamic PDF document with CFDOCUMENT and CFDOCUMENTITEM on ColdFusion 7. But, I need to push further the... -
Perl Newbie question: How would you take keyboard input and run a shell scrip with that input?
I don't think you could be vaguer :) Very basic #!/usr/bin/perl # update.pl multiple options command line my @packages = @ARGV foreach... -
Create Dynamic Input Names or Input Fields in Asp
I have a little code to add multiple items to a shopping cart based page. This code works perfect, but it adds all of the info to the same input... -
Creation of input fields dynamically
kie wrote: Yes, but you're asking in the wrong place. Look for a DHTML newsgroup. There are several on this news server. Bob Barrows -
Formats, fields, input masks, et al
Okay, I understand what you are saying, and the customer wants it, so the customer gets it. And you're right, even if you default the area code... -
OldCFer #2
Re: Array question for input fields
The easiest way is something like:
<input type="hidden" name="passID#cnt#" value="#id#">
<input type="text" name="passingThis#cnt#" value="#DB_value#">
Then on the Action page they would be referenced as
Form["PassID" & i] and Form["passingThis" & i]
Where i would be a counter for each #cnt# number on the submitting page.
OldCFer Guest
-
want-a-be #3
Re: Array question for input fields
Larry,
I did end up coding it a lot like you had shown. It works fine that way I
just thought an array was a lot cleaner to use. I could get the Array length
to use in my loop but I can get that another way.
Thanks for the reply.
bj
want-a-be Guest



Reply With Quote

