It's always been my dream to visit Japan and I'm planning a trip for spring next year. Therefore, I decided to offer plugin/addons development for CFE. Read more >

Custom Form Elements

What is CFE? Custom Form Elements unites all efforts in the web to enhance web-based XHTML forms in terms of style, usability and accessibility by using Javascript and/or CSS. Basically, it's a forms UI. Read more about the features >

How to

all the basics for a kickstart

Here's a simple guide to quickstart with CFE. It covers basic input replacement in 3 easy steps.

  1. Download CFE

    Pick the right package according to the framework / technique you want to use on the download page.

    top

  2. Include the CSS and Javascript files

    Once you copied all the files to your project's directory, you are able to use the power of CFE right away. In the sidebar on the right you'll find a sample directory structure to show you where you may put the cfe files >

    But now on to the actual inclusion of the files in your project:

    Include the css in the <head>-section:

    <!-- add css --> <link rel="stylesheet" type="text/css" href="css/cfe.css" /> <!--[if IE]> <link rel="stylesheet" type="text/css" href="css/fixPrematureIE.css" /> <![endif]-->

    And the javascript files right before the (closing) </body>-tag, so your visitor will see the layout fast:

    <!-- add cfe base --> <script type="text/javascript" src="js/cfe/base/cfe.base.js"></script> <!-- add modules --> <script type="text/javascript" src="js/cfe/modules/cfe.module.checkbox.js"></script> <script type="text/javascript" src="js/cfe/modules/cfe.module.radio.js"></script> <script type="text/javascript" src="js/cfe/modules/cfe.module.text.js"></script> <script type="text/javascript" src="js/cfe/modules/cfe.module.textarea.js"></script> <script type="text/javascript" src="js/cfe/modules/cfe.module.select.js"></script> [and so on - just include the modules you want to use] <!-- add extensions --> <script type="text/javascript" src="js/cfe/addons/cfe.addon.toolTips.js"></script> <script type="text/javascript" src="js/cfe/addons/cfe.addon.dependencies.js"></script>

    Tip: You may want to reduce the number of files (and httprequests), so merge CFE into one single compressed file

    Tip: If you want to further decrease the bandwith usage of cfe, GZip the compressed file before serving

    top

  3. Let the magic happen

    To enable replacement of your input fields just throw in a few lines of code. You are now able to style the form elements using the supplied CSS file.

    Scroll down to the framework of your choice

    for mootools 1.1/1.2

    <script type="text/javascript">// <![CDATA[ window.addEvent('domready', function(){ // creates cfe object var myCfe = new cfe.base(); // starts input replacement myCfe.init({spacer: "gfx/spacer.gif"}); }); // ]]></script>

    Custo's tip for advanced users:visit 'Inside CFE' for developer docs and API

    top

Latest versions
  • File Release: 0.8.2 for mootools 1.2
  • SVN: 0.8.2 for mootools 1.2
  • (old releases for mootools 1.1 can be found browsing the CFE Mootools Package)
CFE on SourceForge
Grab the feeds
Example directory structure
  • css
    • cfe.css
    • fixPrematureIE.css
  • gfx
    • all the cfe-images
    • fileicons directory containing the icons for upload fields
  • js
    • cfe
      • addons
        • cfe.addon.dependencies.js
        • cfe.addon.toolTips.js
        • [...]
      • base
        • cfe.base.js
      • modules
        • cfe.module.checkbox.js
        • cfe.module.file.js
        • [...]
    • your other cool javascripts
Custo tries to monetize