Form as iframe with custom parameters

Hello Folks!

What I’m trying to do:

I would like to use Form from Anvil app as an iFrame in different custom app.
This is quite easy and I know how to do it. But what is tricky and I am not sure how to do it, is to populate that form elements with custom data passed in. So lets say there will be just 2 textboxes for the input. Can I populate values of those textboxes when opening the iFrame in other custom app?

I did not try to implement anything yet, just curious if this is possible.

If you use the Anvil Extras routing module, you can pass the parameters in the URL to use to prefill the form.

Can you point me to some working example?

Here’s the docs on the routing module: Routing — Anvil Extras documentation

And here’s a minimal example that shows setting up routing to open a form with a parameter: Anvil | Login

Between those two you should be able to put something together.

3 Likes

Fantastic, let me play with this!

@jshaffstall thanks for pointing me in the right direction, all is working exactly as I wanted and it was super easy to setup!

2 Likes