Skip to main content
December 1, 2008
Question

Pre-inserting data into Flash Form

  • December 1, 2008
  • 1 reply
  • 1226 views
I have been playing with forms and saw a tutorial on Lynda.com about using flash for a form. I tried it and can't get the results that I want. I want to prefill the fields from a database and it just doesn't seem to work. What am I doing wrong?

I tried to "attach the code" but no button was shown to do so. So here it goes raw

<cfset FirstName="Kirk">
<cfset LastName="Dickinson">
<h1>Form Test</h1>
<cfform method="post" preservedata="true" preloader="no">
<cfinput type="text" name="First" label="First Name:" visible="true" value="#FirstName#" size="30">
<cfinput type="text" name="Last" label="Last Name:" value="#LastName#" size="30">
<cfinput type="button" name="Submit" value="submit">
</cfform>

This simple code works. When I change it to this:

<cfset FirstName="Kirk">
<cfset LastName="Dickinson">
<h1>Form Test</h1>
<cfform method="post" preservedata="true" preloader="no" format="flash">
<cfinput type="text" name="First" label="First Name:" visible="true" value="#FirstName#" size="30">
<cfinput type="text" name="Last" label="Last Name:" value="#LastName#" size="30">
<cfinput type="button" name="Submit" value="submit">
</cfform>

It fails. The form gets created and displayed, but the variables are not inserted into the fields.

Kirk
    This topic has been closed for replies.

    1 reply

    Inspiring
    December 2, 2008
    Hi,

    The same code is working fine for me.. I've tried it with CF 7.0.2.
    December 3, 2008
    I don't understand? It isn't working for me. I have a site hosted on HostMySite. Could be there is a problem with it.

    Kirk
    Inspiring
    December 3, 2008
    It could. I had a similiar problem with that vendor when coldfusion flash forms came out a while back. It has something to do with their site mapping with the folders needed to the flash code.