I think I understand what you’re asking, and if so, it’s definitely possible. If you’re trying to pass the record ID into an embedded form, it’s pretty simple, and I have steps below. If you’re trying to pass the record ID into an outbound URL, though, that’s trickier and I haven’t figured it out yet, either. But here’s what I do have, if any of it’s helpful:
- First, you need to actually get the record ID of the page. This community post by @artur contains the JS code you’ll need to actually pull that information, and it should be inserted inside
script
tags in Page Settings > Custom Code. - If you’re sending this data to an external link, rather than an embedded form, what I think you need to do then is add an event listener that will a) take that record ID, and b) append it to the outgoing link. I found this Stack Exchange post that I think looks promising, but I haven’t been able to get it to work, so who knows at this point.
- If you’re instead sending the record ID to an embedded form, it’s a little different. This post (also by the awesome @artur) gives you a script for how to pass logged-in user data into an embedded Airtable. However, it’ll have to be modified a bit, because you’re trying to pass a record ID, rather than logged-in user data. Instead of using
window['logged_in_user']['softr_user_email']
, you would instead userecordId
, which we collected in step 1. - From there, you can use collect the record ID in Airtable; just be sure to name the Airtable field identically to how you labeled the referrer
As I said, I haven’t yet figured out how to pass the record ID into an outbound URL (if anyone has, let me know!), but if you’re trying to pass the record ID into an embedded form, then steps 1, 3, and 4 are sufficient. For the record, here’s how I set up a Tally form using the steps above.
- JavaScript code I used, which I then inserted in a custom code block
- The hidden field I created to capture the record ID