How to create ‘click-to-call’ and ‘click-to-mail’ links in Anvil?
If you want a link that opens the user’s own email/call software, you can use a Link with mailto:
or tel:
at the start of the URL.
Here’s a clone link for that app:
https://anvil.works/build#clone:PQZZAWPYWFHLWH5A=W5FNRSATGR27GYNZ46WVCMSF
Sending emails and making calls from your app
You can send emails using the Email Service, it’s simply anvil.email.send()
.
https://anvil.works/blog/email-driven-apps
Regarding click-to-call, you would have to embed a service that allows web calling. If the service has a JavaScript API, you can import it using Native Libraries:
and use a CustomHTML Form to write the JavaScript.
Here’s an example where I embedded Jitsi (a web-based video conferencing service similar to Google Hangouts) into an Anvil app:
3 Likes