For example, you could equip your form with the methods popupCreate() and
popupAction() which would allow you to create and service a popup menu from an array of strings.
Executing !this.popupCreate(‘NewPopup’, !fieldArray) will create a new popup menu and assign it to the form.