Answers to Frequently Asked Questions regarding CForms
Yes, that's perfectly alright. In fact, you could post them right here:
I am, you are, he/she/it is. We all do it. Feel free to post questions or to answer them, in a polite and cooperative spirit.
Q. How do I remove the "views" links from the top right of forms?
Q. What are some useful CForm links?
Q. How do I use Forms without the handleForm function
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(dom); form.showForm("form-display-pipeline",viewData ); form.save(dom); ... } |
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="selectOptionList" value-path="value" label-path="label"/> </fd:field> |
Q. Where can the form data go once it's been successfully accepted, and how do you do it?
Obvious requirements would include: