I’m planning out the app I’m about to build, and one of the features we require is sending out secret links to people to click on and join the session.
I tried to find it in the api documentaion but I didn’t have any luck. How would I go about inspecting the url on the first load and open a particular form?
What you’re looking for is the get_url_hash() function (docs here). You can see it in action in the custom user authentication example – it’s what I use for the “confirm your email address” link.
Hey,
What you’re looking for is the get_url_hash() function (docs here ). You can see it in action in the custom user authentication example – it’s what I use for the “confirm your email address” link.
For anyone like me who can never remember how to access the hash (and inevitably winds up on this page every few months,) the documentation has moved to here: Anvil Docs | Navigation
Owen,
Thanks, I will definitely have a look at Hash Routing, although it looks like its much more than I need.
Do you know if it will work for the free Anvil plan?
Regards, Chris.
The paid plan shouldn’t affect this. (To confirm, I’ve switched something in the clone app above that should prevent that message from coming up at all.)
hugetim - strangely, it is now working for me also? I don’t know which browser I was using when it did not work, but I have re-tried on all my browsers, Firefox, Edge, Vivaldi, Brave and Opera
and they all now display Our URL hash is: {‘a’: ‘foo’, ‘b’: ‘bar’}
I have not rebooted, nor logged out of Anvil - so it is a complete mystery, why it was not working before.
Thanks, anyway for your help.
Chris