Well I am not quite as excited as I was when cf7 first got released,
but I am still very excited. The updator includes many bug fixes,
but also some very neat enhancments. My favorite enhancements are
the features around the CF Flash Forms. The first item that I
think just absolutly rocks is support for as directly in cfform via the
cfformitem tag. This allows us to fix one of my pet peeves (as well as have much better formatting) about
flash forms, which is not being able to submit the form when the user
hits enter in a form field. Its certainly not a big deal, but as
I was showing off some forms I built recently it came up with several
users.
<cfform format="flash" onload="loader()">
<cfformitem type="script">
function loader(){
_root.mfname.addEventListener( "enter", textOnEnter );
_root.mlname.addEventListener( "enter", textOnEnter );
_root.memail.addEventListener( "enter", textOnEnter );
}
function textOnEnter(event) {
//alert(event.target);
_root.memberSearch(’searchList’);
}
</cfformitem>
….. You get the point. Oh, and dont miss that onload for the flash form :)
This
lilttle block of code allows me to register the same event listener for
each of the text inputs. then I have a simple function that submits
my form for me. i am sure that this could be done via the
previous AS injection methods, but i feel like this is a better
solution. In truth this opens up a whole world of options and
will help us get around the 32K limit that some of the advance
flashforms have come up against.
The second little update that I
like quite a bit is something i found completly on accident. The
cfformitem type="html" now allows you to pass through and id.
What this has allowed me to do is use as to update the contents of it
with AS without doing anything crazy. For me this was a natural
element for putting in messages and updates for the user in a non
obtrusive way.
<cfformitem type="html" id="displayMsg"></cfformitem>
<cfformitem type="script">
function updateMsg(){
displayMsg.htmlText = "<b>What a great way</b> to alert users!";
}
</cfformitem>
<cfinput type="button" name="btn" onclick="updateMsg()" value="Update"/>
These
are 2 of the changes that come to mind right away that I feel will
impact developers adoption of flash forms, so I wanted to share.
What are your favorite enhancements/bug fixes of the updator?