> Yes it does help, Isaac.    You're right.  And I had
> learned that about iif,
> but since I never had use for it before, it was away in
> the dusty corners of
> my memory.   Now the code is even more concise, to replace
> the 15 lines of
> code in my original post,  and boils down to this:

>  <cfinput type="radio" name="PaymentMethod" value="Visa"
>  Label="Visa" checked="#iif(order.getpaymentmethod(
>                      ) IS
> 'Visa','true','false')#" >

I would also drop the single-quotes around 'true' and 'false'.

> I think the new XML forms would have to be one of the
> least publicised wonders of CFMX7.  It's revolutionised
> the way I collect data.

> And if you put the skin attribute as a application
> variable,  you can standardise the look of forms all
> over your site, and change the whole look everywhere
> with the change of a single variable. For example:

<snip>

> Change the value of application.formskin and behold!
> All the forms on your site change their look and feel
> together.   Easy code reuse!

> WONDERFUL!!

Ha! You really should have a look at some of the features in the onTap
framework's xhtml tools. The framework's xhtml "skins" allow the
layering of multiple xsl transformations, so you can really get some
power and flexibility out of it.

For example, the tapMCE plugin adds an XSL transform to the default
skin (which is then duplicated for most of my other skins that I use
for other things -- which means I'm simply adding to the functionality
of the default skin). The plugin does this because the TinyMCE wysiwyg
editor requires some additional configuration in your forms beyond
simply adding mce_editable="true" to your textarea elements. The XSL
sheet automates the process of adding that extra form configuration in
such a way that other unrelated plugins can just add the mce_editable
attribute to their textarea elements and not worry about the
additional form integration. Of course if the tapMCE plugin isn't
installed, that attribute is just ignored by the browser (or you could
add another XSL sheet to remove them). That's applied application
wide, and unlike similar transformations which might be applied in a
cfform implementation, it's nearly irrespective of the skin that's
applied to a given form, so the form skin could be "blue" or "green"
or "Budweiser" and it would still automatically integrate those
wysiwyg editors without needing to modify any of those skins. :)


s. isaac dealey     434.293.6201
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235739
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to