The add membership action is almost exactly like the add user function. Copy the entire 'getNameForNewGroup' action from the edit function into the 'menu' element.
Like we did with the add group function, we will use a pre-defined form, located in [your_TE_folder]/tableDefinitions/Db2auth/addGroupMember.xml