Groups | Blog | Home
all groups > coldfusion flash integration > january 2007 >

coldfusion flash integration : Pass URL Parameter from html form to flash form


keann
1/2/2007 3:00:18 PM
In CF, I have a link to a form to update a students attendance;
takeattendancehv1.cfm?StudentID=#allstudents.StudentID# . I'm using a flash
form in takeattendancehv1.cfm to populate the studentID. On the flash form, the
studentID appears on the form, but when I submit the form, I get this error:
Element STUDENTID is undefined in URL . Here is my studentID form field in my
flash form: <cfinput name= "studentID"
maxlength = "10"
size = "10"
value="#attendance.StudentId#"
message = "Student ID"
validate="integer">

I'm pretty new at creating flash forms, but would like to know the best
practice for populating a URL parameter from one page to another when using
Flash. Can someone lead me in the right direction.
Thank you.
c_wigginton
1/10/2007 5:15:43 PM
Check your cfform method, if you have it set as post, the result will be
returned in the form.scope.

if you're debugging, try doing a cfdump on the form and url scopes, you'll see
where your data is.

One suggestion is to stick with one scope and convert as necessary. So if the
navigation link to bring up the form is a link, then in the code;

<cfparam name="url.studentID" default="">
<cfparam name="form.studentID" default="#url.studentID#">

<cfform name="myForm" method="post" ....

<cfinput type="hidden" name="StudentID" value="#form.studentID#"....

Then check the form scope in the template that handles the form submission.
AddThis Social Bookmark Button