There is a lot of ways to accomplish your goal. Can you provide more information?
On the top of my mind:
- If you are using usual phoenix templates, route the button to any of your controllers and change the Db’s value there.
- If you are using javascript, send a XMLHTTP request to an specific route on your app and do the same.
- as @kokolegorille said, you can use LiveView to get the same result.
If possible, avoid calling the DB from the template.






















