Passing Parameters to a Popup View

Post code, not pictures of code, so we can copy and edit it in our answers. See Wiki - how to post code on this forum.