On May 27, 2005, at 12:04 AM, Victoria Vitaver wrote:
Basically I need to create a form to capture input from a user of the live website.
Eg. To make a form for a user to enter their interest in a product and allow them to select the product depending on the files that exist in a directory (ie an xml file would correspond to a product). Their response would then be stored in a file and an email would be sent.
Right...
You're correct that you'd be dealing with the "Cocoon" layer there rather than the Lenya layer (but see below). Cocoon has a good forms framework (http://cocoon.apache.org/2.1/userdocs/forms/index.html)
Typically I would be using JSP technology for this kind of form.
Part of the reason Cocoon exists is so that you don't have to use JSP :-). If you use the Cocoon forms framework, that will give you a gentle introduction to "flowscript" (http://cocoon.apache.org/2.1/userdocs/forms/index.html). Flowscript is server-side Javascript augmented with web continuations, and it's the controller language used in most Cocoon applications. Unlike JSP, flowscript is not embedded in page source markup.
What you are describing is not hard to do using the Cocoon forms + flowscript combination.
HTH,
—ml—
PS — For sending emails from Web apps, I recommend the Spring mail sender component... very easy to use.
