How to: Show a form on same page when clicking a button.

Currently I’ve only seen buttons that refer to specific paths like:

<%= link "Show", to: Routes.access_key_path(@conn, :show, access_key), class: "btn btn-default btn-xs" %>

This will link you to another page in your router.
I want to have a button that will popup a small input to push into a function.

More specifically I want to send an email with the current access_key to the given email from the popup input which is sent to a function with a predetermined subject and a reference to the access key.

I don’t think Phoenix itself can make it, you will need client side JavaScript.

You need to write an “on click” handler for your button in JS or with a bit of a css hack. The answer of how depends on if you’re using a framework or not but it’s probably outside the scope of this forum.