Extract original page URL via form in modal

Has anyone figured out a way to extract the page URL via a form that opens up in a modal from an action button?

Currently, I need to have the form on the page itself or else the form will give me the modal’s page URL, not the page where the action button was clicked.

This would be really sleek for UI :slight_smile:

Thanks so much in advance and happy Eastern! :hatching_chick:

Hi @Tim_ClimatEU
Would you mind giving some details on the use-case that would be really helpful?

You can DM me if you prefer :slight_smile:

Sharing the solution here too:

Here is what I would personally do:

  1. I would create a new page with a Form block that you would like the users to be able to submit with hidden fields to grab the recordID of the List details item too. Since the Form block is on the new page, we need to add a recordID to the URL to the Form block, so the hidden field works. Here is how I would do it →
  2. I would create a new Formula field on the Airtable table with the List details item. The formula should be Concatenate formula with the following logic:
    CONCATENATE('https://YourSoftrApp.softr.app/Path_to_The_Form_page?recordId=', RecordID())

Where instead of
https://YourSoftrApp.softr.app → use your app domain
Path_to_The_Form_page → use the path to the page where the form block from step 1 is created

As a result each item will generate a URL to the Form with a recordID with the corresponding List details item

  1. Then I would create an Open URL action button on the table block and would map it to the URL generated with Formula from step 2

As a result the Form can open up in Modal and grab the Hidden fields.