Different starting Forms depending on URL

What I’m trying to do:
Is it possible to have a different Startup Form depending on URL? Or point a Form (for a local superuser e.g.) to only be visible from a URL with a parameter? In such way, I could have a URL with a ?admin or similar parameter which would set a form object visibility to True

What I’ve tried and what’s not working:
I’ve looked around what Form options were available. I found urllib which should allow me fetch URLs into arguments.

Code Sample:

## url handling to hide admin features #https://docs.python.org/3/howto/urllib2.html
import urllib.request
with urllib.request.urlopen('https://studentskevolby.anvil.app') as response:
   html = response.read()

class Form_Voter(Form_VoterTemplate):
  def __init__(self, **properties):
    self.init_components(**properties)
    print(html)

throws a

TypeError: '<invalid type>' object is not callable

Clone link:
(Anvil | Login)

Same as this: Direct URL link for reaching specific form from external system

1 Like

Beautiful, thanks! I didn’t find this one.