Here is a list of Frequently Asked Questions regarding the cfUniForm tag library.
No, it does not. There are numerous WYSIWYG editors available for use, and different people use different ones. As such, the library does not natively force the user into using any particular editor.
However, cfUniForm certainly supports the use of a WYSIWYG editor. Here's an example of using FCKEditor with cfUniForm:
<div id="wrap">
<div class="cfUniForm-form-container">
<uform:form action="#cgi.script_name#"
id="myDemoForm">
<uform:field type="custom">
<label for="skillsInterests" class="blockLabels"><em>*</em> Skills and Interests</label>
<cfmodule template="/fckeditor/fckeditor.cfm"
basePath="/fckeditor/"
instanceName="skillsInterests"
value="#form.skillsInterests#" />
<p class="formHint">
Enter your skills and interests by terms separated with commas (E.g. computers, GTD, running).
Will be presented on your profile as a
<a href="http://en.wikipedia.org/wiki/Tag_cloud"
title="Definition of a tag cloud on Wikipedia">tag cloud</a>.
</p>
</uform:field>
</uform:fieldset>
</uform:form>
</div>
</div>
You aren't doing anything wrong. cfUniForm does not use or support
<cfform> or any of its associated tags.
No, it does not. cfUniForm does not use <cfform>,
so therefore it does not support any of the <cfform>
related tags.
cfUniForm was written with the intention of the developer doing with (or without) the cancel button what he/she chooses to do. In my applications I use it to redirect the request and/or perform other operations (server-side) if it has been clicked. Something like so...
<cfif event.valueExists("cancel")>
<!---
process any cancel functions as required...
redirect the request to the appropriate place
--->
</cfif>
If you want to handle your cancel redirects client-side, you can use the 'cancelAction' attribute to do this. Just supply the URL you wish to redirect to. You can use a full URL (e.g. http://www.domain.com/index.cfm) or just the file name (e.g. index.cfm).
<div id="wrap">
<div class="cfUniForm-form-container">
<uform:form action="#cgi.script_name#"
cancelAction="#_cancelURL#"
id="myDemoForm">
</uform:form>
</div>
</div>
To add server-side validation error messages, simply use a
<cfif> statement to check for an error message
for the custom field. If it exists, add a containerClass attribute
to add the error class, and then use the
appropriate Uni-Form markup
to display the message.
<uform:field type="custom" containerClass="<cfif structKeyExists(errors, 'skillsInterests')>error</cfif>"> <cfif structKeyExists(errors, "skillsInterests")> <p id="error-skillsInterests" class="errorField"> Please enter your skills and interests. </p> </cfif> <label for="skillsInterests" class="blockLabels"><em>*</em> Skills and Interests</label> <cfmodule template="/fckeditor/fckeditor.cfm" basePath="/fckeditor/" instanceName="skillsInterests" value="#form.skillsInterests#" /> <p class="formHint"> Enter your skills and interests by terms separated with commas (E.g. computers, GTD, running). Will be presented on your profile as a <a href="http://en.wikipedia.org/wiki/Tag_cloud" title="Definition of a tag cloud on Wikipedia">tag cloud</a>. </p> </uform:field>
For client-side validation, add the rules that you want applied using the validationSetup attribute on the opening form tag. See the custom validation demo for an example of how to do this.
cfUniForm has configuration options that will allow you to pre-load all of your CSS and JavaScript files, rather than having cfUniForm load them for you. Utilize these settings to seamlessly use cfUniForm-powered forms in your AJAX application. Take a look at the "Pre-Loaded CSS/JS Demo" for more details.
In a nutshell, CSS. You will want to either override the rules in your application's CSS file, or you can configure cfUniForm to use a different stylesheet. Be sure to check this simple example on my blog.
Absolutely! If you have a public-facing form that is being rendered by cfUniForm and would like to show off your use case, please feel free to submit the URL to me, and I will add it to the examples list.