category::ad_form::get_categories (public)
category::ad_form::get_categories \ -container_object_id container_object_id \ [ -element_name element_name ]
Defined in packages/categories/tcl/category-form-procs.tcl
Collects categories from the category widget in the format compatible with category::add_ad_form_elements. To be used in the -on_submit clause of ad_form.
- Switches:
- -container_object_id (required)
- -element_name (optional, defaults to
"category_id"
)- Author:
- Branimir Dolicki <bdolicki@branimir.com>
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set category_trees [category_tree::get_mapped_trees $container_object_id] set category_ids [list] foreach tree $category_trees { lassign $tree tree_id name subtree_id assign_single_p require_category_p widget upvar #[template::adp_level] __category__ad_form__$element_name\_${tree_id} my_category_ids if {[info exists my_category_ids]} { lappend category_ids {*}$my_category_ids } else { ns_log Warning "category::ad_form::get_categories: __category__ad_form__$element_name\_${tree_id} for tree $tree_id not found" } } return $category_idsXQL Not present: Generic, PostgreSQL, Oracle