create_menu_item

Admin-only MCP tool.

Add an item to an application’s menu. Menu items are grouped by application. New items go to the bottom; use change_menu_item_order to move them.

A menu item gives users an easy way to reach a form. When selecting the groups that should see the menu item, take into account which groups have permission to interact with the form. The menu item itself does not affect user permissions in any way, it only provides a convenient link in the user interface. Use get_form_permissions_by_group if you need to learn who can actually use the form.

When forms are created, they automatically get a menu item leading to the form, visible to whichever groups were given permission to edit the form - usually just Webmasters - and one such item in each application the form belongs to. Use list_menu_items with the form_id to find the form’s menu item if you want to change its wording or visibility or destination.

Often it is useful to make common menu items, that everyone should be able to reach, visible to the Registered Users group. Even if there are multiple narrower groups in the system, each one providing specialized access to only certain entries in a form, those behaviours will be handled by the form when users reach it; the menu item can be given to everyone. By using the Registered Users group, you avoid the need to update the visibility settings of the menu item later if new groups are created.

A menu item can also be set as a group’s start page, meaning members of that group land on it right after they log in.

Properties

Property Type Required? Description
application_id integer Required

Required. The application whose menu this item is added to. Use list_applications to find application ids.

link_text string Required

Required. The words people see in the menu.

target object Required

Required. Where the item goes. Give exactly one of form_id, screen_id or url.

form_id integer Optional

Go to this form, showing the user the default list screen, or the default form screen if the user can only interact with a single entry in the form.

screen_id integer Optional

Go to this particular screen. Use this rather than form_id when a form has several screens and the menu should lead to a specific one. Use list_screens to find screen ids.

url string Optional

Go to an address instead of a form or screen. A full address for somewhere outside this site, or one beginning with “/” for a page within it.

groups_that_can_see array of integer Required

Required. The groups this item is shown to. groups_that_can_see and groups_using_as_start_page are replaced by what you supply, not added to, so send the complete list every time. Leave the property out to keep the item’s current groups.

Groups generated from the entries in a form cannot be given menu permissions directly. Instead, give the form-based template group visibility over the menu item. The form-based entry groups will inherit the menu visibility from their corresponding template group.

groups_using_as_start_page array of integer Optional

Optional. The groups that land on this item when they log in. Every group named here must also be in groups_that_can_see, since a person cannot start on a page they are not shown. Where somebody belongs to several groups with different start pages, the one highest in the menu order wins.

note string Optional

Optional. A reminder for whoever maintains this menu. Not shown to anyone using the site.

← Back to the MCP reference