Tally : send an user recordID despite InboxBlock with iframe displayed by Richtextfield

Small puzzle for the best of us, I recently discovered Tally.so and I adapted it to my app (whose demo is here)

As a reminder it is a Inbox block which displays different contents. I added an iframe in an Airtable field, this iframe displays a Tally form. In softr studio, I added a richtext field that display the iframe, it works fine but I have a problem : I can’t pass the record ID of the user.

In fact I saw this topic from @artur, but it implies to declare the iframe after the DOM loaded while in my case the iframe is injected from Airtable. My formula in Airtable already pass the record ID of the displayed record, but of course it’s not in Airtable that I can add the user’s info.

Here is my Airtable formula

CONCATENATE("<iframe src=\"https://tally.so/embed/MYTALLYSFORMID?alignLeft=1&hideTitle=1&transparentBackground=1&dynamicHeight=1\n&recordID=",RID,"\" title=\"The form\" width=\"100%\" frameborder=\"0\"></iframe>")

If someone has an idea of how to manage this in Javascript I’m interested. The goal would be simply to inject &userRecordID= + window['logged_in_user']['airtable_record_id'] on an iframe already loaded by the DOM

Thanks a lot :fire:

Are you sure you need to do this on the JavaScript end? If this formula is in a field of thr airtable record whose id you need to add, you should be able to add it in the concatenate statement.

Hi Lea,
I agree with David!

Maybe this would help you (see the second use case with Vimeo): Airtable formula + scraping businesses or recurring data entries = How to clean your database - 2 use cases

This is not stricto sensu your use case but might inspire you

Buuuut, I can’t dynamically change window[‘logged_in_user’][‘airtable_record_id’] in my airtable formula, by definition all this happens in the softr webapp and in JavaScript ? I’m wrong ?

I looked at your link Matthieu, which is very interesting because it shows that it is possible to pass script in a rich text of record details, but I did some tests and it does not work in my case

Perhaps I just need to edit src of the iframe, with a script in airtable ?

The thing is, you need a recordID, which is inside Airtable.
The idea for you is to find a workaround (maybe changing a bit your page interface?) that would get rid of your need for javascript.

But I don’t know what is your process to arrive at this point.

And I’m not sure window[‘logged_in_user’] would work inside a formula field in Airtable… As it is not in the right window (your softr page).
But David may know better about it concerning adding javascript in Airtable fields.

Not really, because this record ID is in the user table, here the content is diplayed from a content table from Airtable

Badly, it’s a few like this page and I can’t change it

That’s the big question, I also asked the support in the studio and, generally the same answer that us :melting_face: