Please review!! This page needs validation by people more experienced and knowledgeable about CForms.
What you will get from this page
This page presents a series of minimal examples for people new to CForms.
The creation of this page was motivated by my own need to simplify the examples currently available for CForms. Though the current examples are rich with information, I found that they are difficult for first learning about CForms precisely because they are so rich in information. For CForm newbies, I believe that it would be easier to have more minimal examples that show each of the many concepts.
Your basic skills and Technical prerequisites
You need to have a general understanding of what Cocoon is, including:
<TODO: provide links to all these concepts>
Links to other information sources
cforms-dynamic-tutorial.zip - contains the files for the dynamic CForms tutorial
CForms provide a useful and relatively simple means of producing web-based forms. CForms are relatively simple to author, but there are so many concepts involved that it can be difficult for the beginner to grasp what is happening.
These tutorials are based on my own ongoing struggle to learn about:
- what CForms are
- how CForms work
- how to effectively use CForms
The tutorials each have a short explanation on this wiki page. The bulk of the information is provided in the form on inline comments in the actual tutorial files that are attached to this page.
Eventually, if these tutorials are actually useful, they could be moved to the main Cocoon examples in the Cocoon distribution.
Please update the content both on this page as well as in the attached files if there are errors or omissions. Remember that I am learning CForms myself. What I claim in the tutorials is based on deduction and reverse engineering. Hopefully, people more experienced with the inner workings of CForms will soon be able to validate these tutorials.
The first (and for now the only) tutorial explains how to create a minimal dynamic CForm.
By "dynamic", we mean that when the user changes a value in the form, an action will trigger an update of the form. (You'll understand better what this means when you actually see the examples.)
This tutorial contains 10 files packaged in the file cforms-dynamic-tutorial.zip. In alphabetical order, they are:
This file provides a simple welcome page to the (eventual) various tutorials. (For now there is only 1 tutorial.)
The sitemap for the tutorials. The goal is to provide a minimal sitemap to help with the comprehension of how CForms work.
This is the definition file for the sample form.
This is the template for our form.
The flowscript is contained in this file. Control is passed to the flowscript from the sitemap.
This page is displayed when the form is submitted.
A simple transform for the pages in this example. This will most likely be replaced by your own page transform.
A (somewhat) minimal example of a file needed (?) for styling the form. I am still in the process of trying to figure out what is necessary and what is fluff.
A simple css for rendering the pages.
There are a few things that I am unable to explain. Most of them are indicated by <TODO> tags in the inline comments. I mention here, however, one thing that has me puzzled.
Can somebody explain this to me?
-- It resides in the forms-styling.xsl stylesheet:
<!-- Location of the resources directory, where JS libs and icons are stored -->
<xsl:param name="resources-uri">resources</xsl:param> TrondAlbinussen