Forum OpenACS Q&A: Re: Any xowiki demo?

12: Re: Any xowiki demo? (response to 11)
Posted by Antonio Pisano on
I had already found some exported forms here: . Alas, they are not working on current XoWiki.

Looking further, I finally found this:

This was exactly what I was looking for! I've linked the examples in XoWiki doc page to ease the struggle for the posterity.

13: Re: Any xowiki demo? (response to 12)
Posted by Gustaf Neumann on
Hi Antonio.

These are exports of xowiki instances, and not thought for humans! In applications, you will have different IDs, but most of these are provided as well automatically. Please look at the following example. I've added this as well to

all the best

# Sample snippet to show, how to create an 
# ::xowiki::Form programmatically

# Get package_id by initializing the package
::xo::Package initialize -url /xowiki

set template {
set fc {

# Create a form instance in memory
set form_id [::xowiki::Form new -destroy_on_cleanup \
             -package_id $package_id \
             -parent_id [$package_id folder_id] \
             -name "en:sample.form" \
             -anon_instances "f" \
             -form {} \
             -text [list $template text/html] \
             -form_constraints $fc]

# save the form to the root folder of the package
$form_id save_new
14: Re: Any xowiki demo? (response to 13)
Posted by Antonio Pisano on
Thanks for the example!

Don't worry, I've stated clearly that those forms are meant to be imported into xowiki, rather than being used in code directly. I've found them useful to show some advanced form specification.