Experimenting with Flash Forms
Posted on Jul 21, 2005
As I mentioned yesterday, I was going to build my first "mini" app using flash forms. It was heavily based upon Laura Arguello and Nahuel Foronda's "Constructing an Application with Flash Forms from the Ground Up" article from CFDJ. I found it an excellent article to get anyone thinking of getting started with Flash forms. I was shocked at how quickly I was able to get a nicely interactive form up and running.I have used some Flash form elements earlier, but mainly just the tree element in flash (which isn't so easily represented otherwise). However, the work of Laura and Nahuel as seen on their blog, ASFusion, in large part convinced me that the flash forms in CF were more than gimmicky or a "teaser" for Flex (Raymond Camden also has some very useful Flash Form related posts).
I did run into one problem with checkboxes. The bind attribute worked fine on text form elements, but didn't work on checkboxes (it appears this may be true also for radio buttons, but that wasn't relevant to me). I had to add this code to my cfgrid tag - onchange="{isActive.value = itemList.selectedItem.isActive}" (isActive and itemList being elements in my query and form).
Considering the speed and ease of developing advanced Flash forms, I wish I could use them more. The one issue I keep running into is the lack of file upload (which I can understand for security purposes) and the lack of a full featured WYSIWYG editor such as FCKEditor (although this Rich TextArea for flash CFForms is very cool, it offers a limited feature set). That being said, I contnue to be amazed at what people have been able to do with Flash forms, and I hope that Laura and Nahuel keep up the good work.
Comments
Brian,
For those times when you need to use HTML forms, check out the qForms API:
http://www.pengoworks.com/qforms/
It should allow you to build the same type of Flash functionality into your HTML forms w/a pretty easy straightforward API.
Posted By Dan G. Switzer, II / Posted on 07/21/2005 at 10:34 AM
Stay tuned for flash player 8. It will support file uploads. Though I don't know if CF will be able to utilize the functionality in flash forms or not.
Posted By Ryan / Posted on 07/21/2005 at 10:49 AM
Just to note that Laura posted a solution to the checkbox issue on ASFusion at http://www.asfusion.com/blog/entry/binding-checkboxes-in-flash-forms
This is a preferable solution to the one I posted.
Posted By Brian Rinaldi / Posted on 07/22/2005 at 9:24 PM
Brian,
Thank you for making reference to the CFDJ article and our blog!
We are always happy to be of help.
We'll try to keep up!
Posted By Laura Arguello / Posted on 07/22/2005 at 10:08 PM
Any advice for this example??? I have a query that selects a list of people that I am using to create my select grid. Then I have another query that creates a list of check boxes (items a person is associated to all yes or no type of things). Finally I have a third query that returns all of the items that each person is associated to. How would I update my checkboxes when I select a person from my select grid???
I posted this same question to ASFusion by the way... It has me a bit stumped right now...
Posted By Kurtis D. Leatham / Posted on 08/15/2005 at 1:10 PM
I am not sure I am totally clear, but it sounds like you are creating the list of checkboxes dynamically. If you named them based upon the id of the attribute (like "checkbox_[id value]" or something more appropriate), then couldn't you make a remoting call and return your list of attribute IDs when the person is selected on the grid. You would loop through this list and do an eval("checkbox_[id value]") to set the checkbox object you want to set. I have no idea if this would work as I have not encountered that situation yet though, but, in theory anyway, it sounds doable.
Posted By Brian Rinaldi / Posted on 08/16/2005 at 4:06 PM