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. It's a forms ui library. 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 you want to use on the download page.

    top

  2. Include the CSS and Javascript files

    Include the css in the <head>-section
    (you might have to change the path according to your directory structure):

    <!-- cfe css --> <link rel="stylesheet" type="text/css" href="css/cfe.css" />

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

    It is recommended to use the library file (cfe.js; uncompressed for debugging) or the compressed file (cfe-min.js; for production env) provided in the CFE download package (you might have to change the path according to your directory structure):

    <!-- cfe --> <script type="text/javascript" src="js/cfe/cfe-min.js"></script>

    Feel free to create your own compressed version of cfe with the modules you like or add the javascript files uncompressed one by one to your site. If you do so, please mind the dependencies.

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

    top

  3. Setup CFE

    To initialize cfe and let the magic happen, you might just use this simple code:

    window.addEvent('domready', function(){ /* path to a 1x1 pixel transparent gif */ cfe.spacer = "gfx/spacer.gif"; /* create a cfe replacement instance */ var myCfe = new cfe.replace(); /* now you may set options [see cfe.autostart.sample for details] */ /* initialize cfe */ myCfe.init(); });

    For more options, refer to the cfe.autostart.sample.js and/or read the docs.

    Custo's tip for advanced customization of form elements:visit 'Inside CFE' for developer docs and API

    top

Like CFE? Why not write a review?

If you like using CFE, please write a review at CFE's projekt page at OHLOH.net.

Please feel free to post comments, suggestions or hints. However, if you need help, please use the forums. Found any errors? Please report bugs.