# Menu focus group

The [Menu Focus Group reusable element](https://docs.airdev.co/canvas-pages-and-modules/reusables/menufocusgroup-or-menu-options) is useful for dashboards or to have dropdowns of user actions that you can place throughout your app (or copy and replicate the logic).

In order to set up this reusable element, you'll need to be comfortable setting up Bubble workflows, and  comfortable duplicating reusable elements.

{% hint style="info" %}
This element is versatile and can be used for many different elements in one app. An app may end up having more than 10 different menu focus groups to allow for creation, editing and deletion popups of different data types within portals/tables.
{% endhint %}

### Modifying default element

By default, this element is used as a part of the Admin portal to allow you or your admins to manage your Users from inside your Bubble app (instead of via the Bubble editor). It includes the following actions:

* Reset password (Note: only works on paid Bubble plans, uses an API WF)
* Edit User
* Delete User

If you'd like to change any of these actions or add new ones, you'll need to open up the `menufocusgroup` reusable element in the Bubble editor for your application.

Then, in the Workflows tab, select the group that you'd like to edit. By default, group 1 is the Reset Password action, 2 is the Edit User action, and 3 is the Delete User action. Groups 4 and 5 are hidden from the user and don't do anything by default.

![Workflows in the menufocusgroup reusable element](https://2550662654-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LYJWnUT3lUFQk1K9BCK%2F-LtzbDaZkRE2KVrdDwLh%2F-LtzjErl7T2uULmTBehV%2FScreenshot%20from%202019-11-18%2013-18-26.png?alt=media\&token=04d14b92-20fb-4e1b-8b5b-27758b00319a)

You'll also need to show the other "Group option" buttons in the design tab if you'd like the user to be able to see them.

![Check the box on the element "Group Option 4" and change the text on the element "Text Option 4"](https://2550662654-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LYJWnUT3lUFQk1K9BCK%2F-LtzbDaZkRE2KVrdDwLh%2F-LtzjwXhR8xQ-ArYQtBx%2FScreenshot%20from%202019-11-18%2013-19-32-edited.png?alt=media\&token=154b5445-6bc6-4e5d-a5c8-3b523d767186)

Here's a video explanation of how you can set up new actions, and seeing where the actions actually happen in the Bubble app.

{% embed url="<https://vimeo.com/373967121/66a34c13e4>" %}

### Setting the data source

Make sure to also set the data source of the reusable element on the page where it is found. Otherwise, the actions won't have any reference as to which User to modify, and won't modify any data as a result.

!["Parent group's User" refers to a cell's User in this case](https://2550662654-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LYJWnUT3lUFQk1K9BCK%2F-LyUUtzSvES4iW9PoBdV%2F-LyUWfIRyQ6Bzj-LiPEI%2Fmenu-focus-group-rg.PNG?alt=media\&token=a57c4986-72e4-4c75-ab98-807b7c968eaf)

In this reusable element, this allows for the correct user to be edited in each cell. The parent group of the reusable needs to have its data source set correctly, and that group's parent group, until the last one says`Current cell's User`.

### Using add/edit popup

This reusable element comes with an add/edit popup which allows users to add or edit an object.&#x20;

If you want to use this popup somewhere without actually displaying the menu to the user (e.g. from another button, or as part of a signup flow), you should place the reusable element in the [`hidden variables popup`](https://docs.airdev.co/canvas/2.0.0-1/using-the-template/setup/features/hidden-variables-popup). This allows you to access this functionality without duplicating the add/edit user popup.

![Add the desired menu reusable element to the Hidden Variables popup on your target page](https://2550662654-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LYJWnUT3lUFQk1K9BCK%2F-LyUm9pg8pPPbldJc9Rb%2F-LyUpwcQaytDAZJlVO8Q%2Fhidden-variables-reusable.PNG?alt=media\&token=1ee6403f-9f6f-4d6d-bc12-a498fa17d9ea)

![Trigger the action from somewhere on the page](https://2550662654-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LYJWnUT3lUFQk1K9BCK%2F-LyUm9pg8pPPbldJc9Rb%2F-LyUqnpvk_YUgp18vWEp%2Fhidden-variable-reusable-trigger.PNG?alt=media\&token=8e08a5d2-8c0f-4290-b2fb-5e036e9908d9)

![Display data in the reusable element to edit existing data](https://2550662654-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LYJWnUT3lUFQk1K9BCK%2F-LyUm9pg8pPPbldJc9Rb%2F-LyUqu6K_eyddtWejQ9d%2Fhidden-variable-reusable-trigger-display.PNG?alt=media\&token=4e99a375-42b8-45ea-8658-a8e8c6d0308e)
