Finally got the form to work in popover.