ColdFusion Flash Forms – Width and Height Don’t Work?

It seems like every time I have to humble myself to use ColdFusion Flash Forms, I struggle to the things to layout the way I want them too. This is particularly apparent in cases where you just want a simple form with a panel as the primary container. I’ve frequently done this by setting the height to 100%, width=”100%”, only to view the form and see it look more like 20% height and width! Not very intuitive Adobe!

Sample Code that results in form layout that drives me nuts:


<cfform format="flash" height="100%" width="100%" id="myForm" action="foo.cfm">
<cfformgroup type="panel" label="My Form" width="100%" height="100%">
<blah>
</blah>
</cfformgroup>
<cfform>

The fix for this is EASY! Remember, all ColdFusion flash forms are just flex code, so many attributes to tags that work in flex can work in ColdFusion flash forms as well. So, to “fix” this, I “borrowed” the

percentWidth

and

percentHeight

attributes for flex components and used em’ on my panel as follows:


<cfform format="flash" percentHeight="100%" percentWidth="100%" id="myForm" action="foo.cfm">
<cfformgroup type="panel" label="My Form" width="100%" height="100%">
<blah>
</blah>
</cfformgroup>
<cfform>

Problem Solved!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: