We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

onclick in volt

How to write onclick event in submit button ....written in volt



93.7k
Accepted
answer
edited Oct '16

Here you go :)

{{ submit_button('Send', "onClick": "return confirm('Are you sure?')") }}

You can view other Tag helper functions and how to add options here: https://docs.phalcon.io/uk/latest/api/Phalcon_Tag.html