How to add client side function call from custom HTML?

Let’s say we have in custom HTML next <li>

<li><a href="./_/theme/html/index.html" class="getstarted">Get Started</a></li>

How it’s better to add call to anvil.users.login_with_form() from it instead of having href=…?

Thank you!

If you want to trigger Python code, such as anvil.users.login_with_form(), it’s much easier to do it with Anvil’s own components, rather than with custom HTML. So much easier, that I’ve never felt the need to resort to custom HTML.

You’ll probably find what you need here: Using JavaScript

1 Like

Yes, thanks - I move with Anvil own components!