How can I dynamically populate a form field in my Colab notebook from a URL query parameter so I can construct preconfigured links to it from another system? I tried adapting Can a Jupyter / IPython notebook take arguments in the URL? but the JS in colab runs in a sandboxed iframe with a referrer policy which removed the path and query from document.referrer.
I would also like to make it as easy as possible for someone following such a link to run the notebook on the data supplied in the form fields. Is it possible to connect and run all automatically on opening a notebook? Is there a way to display a 'Run all' button so the user does not have to hunt for it in the menu?
No, you cannot, but you can set the default values to the form. As the answer shows, the variables' values are the form's default values. Maybe you could create multiple cells with different default values.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With