Hello,

I need to implement a wizard using CForms. For this I had created one form definition which contains all fields of all wizards. Within the flowscript I only create one form instance for all shows. Each wizard form will contain a subset of fields of the form definition. At the end of the wizard trip I want to get all datas into one model. My flowscript looks something like this:

function foo {

  var form = new Form("form.xml");

  form.showForm("wizardStep1");

  // Do something here

  form.showForm("wizardStep2");

  var model = form.getModel();

  // Do something with model here

  // Send ok page
  cocoon.sendPageAndWait("ok.html");
}

But this doesn't work. The first wizard will be shown and the second one, too. But after filling out and sending the second form cocoon will allways display the second wizard and not go to the ok.html page. Isn't it possible to make several calls of showForm on one instance? Whats wrong here? Is this a known problem?

Here you can see the second template. It should be correctly because no error was thrown:

<html xmlns:ft="http://apache.org/cocoon/forms/1.0#template";
xmlns:fi="http://apache.org/cocoon/forms/1.0#instance";>
<body>
<ft:form-template action="#{$continuation/id}.continue" method="POST">


 <ft:widget-label id="password"/>
     <ft:widget id="password">
       <fi:styling type="password"/>
     </ft:widget>
     <br/>
     <ft:widget-label id="confirmPassword"/>
     <ft:widget id="confirmPassword">
       <fi:styling type="password"/>
     </ft:widget>
     <br/>
     <ft:widget id="spam"/>
     <ft:widget-label id="spam"/>
     <br/>
     <input type="submit"/>
</ft:form-template>


</body> </html>

Thank you.

Regards
Stephan



Reply via email to