Ok, so I am new to the whole cform thing. It seems like a good way to implement forms...BUT
I can't get it to work. I've gone through the 2.2 and 2.1 documentation but I can't get it to work. Let's keep it simple and use the sample: The sample from http://cocoon.apache.org/2.2/blocks/forms/1.0/478_1_1.htmldoesn't use binding. What If i wanted to add binding and save the results to a file? I've noticed the "simplebinding" and found the following flowscript on the web somewhere, but It doesn't work... Please, somebody tell me how it should be done? -what should be in the sitemap? -what should be in the binding xml? -should the template or the definition als contain something that points to the binding.xml ? cocoon.load("servlet:forms:/resource/internal/flow/javascript/Form.js"); function registration() { *form.createBinding("cocoon://resource/internal/registration_binding.xml"); * var form = new Form("cocoon://resource/internal/registration_definition.xml");; form.showForm("registration-display-pipeline"); var viewData = { "username" : form.getChild("name").getValue() }* form.saveXML("cocoon://resource/internal/binding.xml");* cocoon.sendPage("registration-success-pipeline", viewData); }
