Forum OpenACS Q&A: Creating a XOWiki form page

Collapse
Posted by Matthew Smith on
How do you create a XOWiki form page?

How do you use tags like this to create pages?
::xowiki::Form

Collapse
Posted by Matthew Smith on
I have tired creating a template and then an instance. Here is what I have on the template:
-----------------------------------------------------------
>::xowiki::form<<

>::xowiki::formfield::text -name textfield -size 15<<

><<

><<
-----------------------------------------------------------
However this just produces a blank page.

I have no idea what I'm doing here so any guidance would be wonderful.

Thank you.

Collapse
Posted by Dave Bauer on
This I can answer :)

One way to create a form (or any specific type of xowiki item) is to visit the admin page under your xowiki install.

From there you can see all the different xowiki types you can create. Click the little paper with a + icon to create a new xowiki form.

NOTE: When you are viewing an xowiki page or any type and click New Page, it will create a page of the same type. To create a page of a differnt type you can create a typed link ie [[type:name]] and then click on the link that is generated for that when you save the page. The other way is to use the admin pages.

Collapse
Posted by Matthew Smith on
I have tun into something that may be indicative of not having the latest software. I found this post:
https://openacs.org/forums/message-view?message_id=334982

Which has a link to this form application export:
http://media.wu-wien.ac.at/download/xowiki-forms-demo.export

When I try to import, I get this message:
Error: invalid command name "::xowiki::FormPage"

Also, when I go to the admin page, here is a list of the type of pages shown:
::xowiki::Page
::xowiki::PlainPage
::xowiki::Object
::xowiki::File
::xowiki::PodcastItem
::xowiki::PageTemplate
::xowiki::PageInstance

From the presentation, ::xowiki::Form is a subtype of ::xowiki::Template, and ::xowiki::FormPage is a subtype of ::xowiki::PageInstance.
That is why I was trying to create templates and a pageinstance.

Does the lack of froms showing up indicate a problem with the software install?

The version of xowiki installed appears to be 0.47.

Collapse
Posted by Dave Bauer on
Latest stable version is .060.4 available for OpenACS 5.3.x on the oacs-5-3 branch in CVS.

Latest development version is 0.86 available on cvs HEAD.

Collapse
Posted by Matthew Smith on
Thank you for the help, Dave. I will get this upgraded which should be a big help.
Collapse
Posted by Stefan Sobernig on
Thanks Dave, for clarifying this!

@Matthew:

XOWiki as authoring environment comes with many tastes and smells of authoring instruments. These instruments group, rougly, into "content model items" (::xowiki::Page, ::xowiki::Form, ...) and "presentation model items", i.e. basically authoring support in the richtext editor environment (block markers of all kinds: [[...]], {{...}}, >>...<<). While these concepts are of course interwoven, you were confusing them in the above attempt to create a form.

You were using a layout-only block marker (>>...<<) and tcl script blocks. The reason why it turned out blank is the character block between the >>,<< delimiter is resolved against CSS classes which allow some in-place layouting.

Generally speaking, it is not allowed to execute entire Tcl/XOTcl code blocks from within ::xowiki::Page content (richtext content). End-user or author-driven programming is only allowed in certain contexts and always mediated through a dedicated interface (includelets, for instance).