How to pass logged-in user data to Jotform?

Hi, I am looking to prefill the record id of the user or his email address in a Jotform embed form. How to do it ? Thanks

Hey Nicolas,

Please, check the following thread.

Here is a jotform specific example:

    let jotformUrl = '';

    if(window['logged_in_user'] && window['logged_in_user']['softr_user_email']) {
        jotformUrl = jotformUrl + '?email=' + window['logged_in_user']['softr_user_email'];
        jotformUrl = jotformUrl + '&name=' + window['logged_in_user']['softr_user_full_name'];

    document.write('<script type="text/javascript" src="' + jotformUrl + '"></' + 'script>');

1 Like

Hi, similarly is there a way to pass in the list details selected record and not just the logged-in user ?
Secondly, can i pass on a get/put request as well via the custom code block?


1 Like

Hi @arappai,

Yes both possible. recordId is part of URL you can grab it in there and pass and with custom code you can also make API calls


thanks, Arthur, is there any other properties of the record id that we can grab? :slight_smile:

Actually, other data can be prefilled via URL formula in AT, so that should be fine, i guess. Still curious

Hey @artur, I’d been working on something similar to this, but it was an embedded jotform coming through a list block on a detail page. You’d been helping me and then the project was put on hold so I’m just looking to get back to finishing up the app and hoping you can add a little clarity here on how to pass both the detail page record ID from the URL as well as the logged in users’s record ID from the profile through to the embedded jotform via URL prefill.

1 Like

Hi Nathan,

I recall that the form was dynamically coming from Airtable in the details block, and we needed to fill in some data.

Can you DM me some details to try out?

Hi @artur , I’m not sure the best way to DM you, but basically we have a code like this:

<iframe id="JotFormIFrame-213613012641138?MCID={LOGGED_IN_USER:AT_RECORD_ID}&listingAt=recordId" onload="window.parent.scrollTo(0,0)" allowtransparency="true" allowfullscreen="true" allow="geolocation; microphone; camera" src="{LOGGED_IN_USER:AT_RECORD_ID}&listingAt=recordId" frameborder="0" style=" min-width: 100%; height:1000px!important; border:none;" scrolling="no" > </iframe>

and “{LOGGED_IN_USER:AT_RECORD_ID}” represents where we want to insert the logged in user’s airtable record ID, and “recordId” represents where we want to insert the record ID of the detail page that the user is viewing this on. This embedded form code is coming dynamically from a table configured in a list block, on a record detail page.

1 Like