Dear Wiki user, You have subscribed to a wiki page or wiki category on "Cocoon Wiki" for change notification.
The following page has been changed by CombinationalLogic: http://wiki.apache.org/cocoon/CFormsFAQ ------------------------------------------------------------------------------ == CForms Styling == - === How do I remove the "views" links from the top right of forms? === + Q. How do I remove the "views" links from the top right of forms? + - Your answer here :) + A. Your answer here :) == Resources == - === What are some useful CForm links? === + Q. What are some useful CForm links? + + A. * [:Forms] * http://cocoon.apache.org/2.1/userdocs/forms/index.html + * [http://archive.apache.org/dist/cocoon/events/gt2004/presentations/Sylvain_Advanced_Cocoon_Forms.pdf Sylvian_Advanced_Cocoon_Forms ] + + == CForms/Flow/Sitemap == + Q. How do I use Forms without the handleForm function + + A. Call your custom flowscript function from the sitemap. The sitemap and funciton might look as follows: + + '''Flow script:''' + + function myFormFlow(){ + var documentURI = "path/to/your/xml_do_to_bind_to.xml" + var form = new Form("path/to/your/form_def.xml"); + var dom = loadDocument(documentURI); + var viewData = new Object(); + viewData.selectOptionList = new Array(); + viewData.selectOptionList.push( {value: "1", label: "option 1" }); + form.createBinding("path/to/your/form_bind.xml"); + form.load(boundDoc); + form.showForm(elem+"form-display-pipeline",viewData ); + form.save(boundDoc); + ... + } + + '''Site Map:''' + <map:match pattern="the_form"> + <map:call function="myFormFlow"/> + </map:match> + + '''Segment of form def field with options defined in flow:''' + <fd:field id="class" required="true"> + <fd:label>Select an option:</fd:label> + <fd:datatype base="string"/> + <fd:selection-list dynamic="true" type="flow-jxpath" list-path="classList" value-path="value" label-path="label"/> + </fd:field> +
