Class ::Generic::Form (public)
::xotcl::Class ::Generic::Form[ -add_page_title add_page_title ] \ [ -edit_page_title edit_page_title ] [ -data data ] \ [ -folder_id folder_id ] [ -name name ] [ -package_id package_id ] \ [ -submit_link submit_link ] [ -with_categories with_categories ]
Defined in /var/www/openacs/packages/xotcl-core/tcl/generic-procs.tcl
This class was designed together with the content repository class ::xo::db::CrClass for the generation of HTML forms, but it can be used also with different classes. The only hard requirement is the presence of an 'item_id' form field. For generic acs_objects, 'item_id' will correspond to 'object_id' column in 'acs_objects' table. For content repository items, 'item_id' will be the column by the same name in cr_revisions/cr_items.
- Switches:
- -add_page_title (optional)
- page title when adding content items
- -edit_page_title (optional)
- page title when editing content items
- -data (optional)
- data object (e.g. instance if CrItem)
- -folder_id (optional)
- associated folder id. Will default to data's 'parent_id' variable. If 'parent_id' is missing too, package's 'folder_id' will be used.
- -name (optional)
- name of the form, used for naming the template, defaults to the object name
- -package_id (optional)
- package_id of the object. Will default to data's 'package_id' variable
- -submit_link (optional)
- link for page after submit
- -with_categories (optional)
- display form with categories (default false)
- Testcases:
- No testcase defined.
![[i]](/resources/acs-subsite/ZoomIn16.gif)