Grist Secrets: Popups

Shoutout to one of our amazing developer, @jarek for sharing this secret! This was the final secret shared in our Grist Secrets webinar on August 21, 2025.

Check out the example here: Popups - Grist

This example walks through how to add a Notepad popup. Any widget can be used for the popup. The steps would be the same. The example document linked above also shows an Image Viewer custom widget popup.

We have a table where we want our popups to live. Depending on the widget, you’ll likely need a column to write the data to. You’ll also need a column for your popup link.

The widget that you want for the popup needs to exist somewhere in the document. Add your widget to a new page. For the Notepad widget, we’ll need to select ‘Custom’ as our type then select the data table that we’ll read / write to (Popup).

Select your custom widget (Notepad) and ‘Add Widget’.

Configure your custom widget by granting the widget Full document access (it needs to read/write to our table). Then, select your Content column. We’ll be reading / writing to the Notepad Text column in this example.

Next, let’s set up our popup :ok_hand:

Enter = into a cell in the Notepad popup column to turn it into a formula column.

Copy/Paste the following into your formula cell;

f’[Open]()'

Click enter to apply the formula.

Next, right click in a cell in your Popups table and select ‘Copy Anchor Link’.

Paste your Anchor Link into the formula between the parenthesis.

We still need to make a few modifications. First, we need to modify the row number to look at the id of the current record. This way, our popup is unique to each record. Replace the number following r in the formula with {$id}.

We also need to update the number following #a to 2 instead of 1. This changes the type of link.

Next, we need to figure out the section number for our widget. Navigate to the page containing the widget we want to use for the popup. Click the three-dot icon at the upper-right of the widget and right-click on the ‘Download as CSV’ option. Select ‘Copy link address’.

Paste it somewhere so you can read the link. Specifically, we are interested in the Section number. In the example below, the Section number is 4. Remember this for your widget - we’ll need to modify our popup URL to include this.

Update the number following s in your popup URL to this number.

Update the Cell Format to Markdown.

Click your popup and edit the text using the Notepad widget popup.

It will write to the column that we mapped earlier, Notepad Text.

This column can be hidden from view and data from the popup will continue to read/write to it.

3 Likes

This is cool! I wonder if this can be done in a Markdown widget instead of Notepad? Thanks.

Hey @deuts - yes, any widget can be used. You would follow the same steps as above, just adding the Markdown widget to your document instead.

1 Like

Great tip, thanks!

And the widget even stays selected by the current record in the originating widget (if not changing page in the popup link) !

1 Like