Forum OpenACS Q&A: Question about categories for instances of an xowiki::Form

I have created an xowiki::Form that accepts the various components of a tightly templated page. The xowiki::Form itself can be assigned a category on its edit page.

When I create an instance of the xowiki:Form (i.e. 'fill it in' to create content pages) I want to be able to allocate categories to each of these instances. However as things stand the categories selector is not present on the 'fill in form' page.

How do I switch this on so that I can have a single xowiki:Form that is not assigned a category, that I can use to create pages that are arbitrarily assigned categories at 'fill in' time.

Regards
Richard

Sorry, I keep answering my own questions!

add:

{@categories:true}

to the form constraints box of the xowiki::Form definition.

Now the categories selector appears for every instance of that xowiki::Form.

with @categories, one will get for this form all category trees added. This is not always the best choice.

One can get as well categories per form selectively, with the full range of configurability (e.g. select vs radio, using vertical or horizontal radio buttons, different requiredness, mulitplicity, label, ...., at the place in the form, where you want it, etc. The example below shows the form-constraints for a field named audience, using the category_tree audience...

audience:select,required,multiple=true,category_tree=audience