Turning the default text field in a List Details block into a clickable link

Hello all! Checking to see if this is possible: I want to turn the default/locked text field in a List Details block into a clickable link. Like so:

For reference, I have two tables: a city table and state table. The screenshot above shows the city table. In the city table, I have a lookup column that pulls the URL for its state’s detail page. In other words, each city’s record already has the exact state record URL it needs to reference–it’s just a matter of whether or not I can turn that locked Missouri text field into a clickable link with some custom code.

If it’s not possible, I know the workaround would be to just create a button or URL list item that contains the State detail page URL. I’m just reluctant to get rid of the pretty UI above, so I wanted to check with y’all first to see if you know a way to do it :slight_smile:

Hi @adalys
There is no native way to set it up, but let me suggest a workaround.

  1. First it’s important to generate the URL of the List details page in Airtable table with the List items. The following formula might help with it:
    CONCATENATE('https://YourSoftrApp.softr.app/List-Detail-Page?recordId=', RecordID())
    Where the https://YourSoftrApp.softr.app is your Softr App link
    and the List-Detail-Page → is the path to the List details page where you would like to redirect it
    meanwhile the RecordID() is a formula to generate recordIDs for the items.

  2. Once the URL is generated I would suggest to create a new Formula field where an ahref HTML code will be added. The formula should be the following:
    CONCATENATE('<a href="', URL field from step 1,'" target="_blank">', Text field, '</a>')

Where the URL field from step 1 is the field that is generated with the Formula in step 1 (the list details page with recordID) and the Text field is apparently the state for your case.

  1. Then I would suggest mapping the Formula field from step 3 to Softr text field and it should work.

Let me know if it helps :slightly_smiling_face:

Hi @Viktoria ! Yup, that’s the workaround I mentioned above–I was just wondering if there was a way to use a script to target the specific text so that I wouldn’t have to use that workaround. But that leads me to another question/a potential bug:

I implemented the workaround, but I’m seeing some weird behavior. Take a look at the screenshot below.

All of those 4 fields above are pulling from the same lookup column (the concatenated formula that’s meant to redirect the user to the State page). However, the only field that actually pulls the correct URL is the URL field. If I click on the text/rich text/heading links, they’ll instead link to the current page’s URL (in other words, clicking on those first 3 links just refreshes the page, rather than redirects to the new page). Here’s a screenshot showing what I mean:

I’ve tried to explain as clearly as possible, but please let me know if my explanation is confusing! I’ve used this exact format before in previous apps, so I’m not sure if it’s a Softr bug or if I’m missing/forgetting something obvious. Any ideas?

@adalys I think the issue is in the Lookup field. Usually Airtable sends the Lookup field values with the quotation mark, therefore the other fields don’t work.

I would recommend turning the Lookup into a String with the following formula
Your Lookup field & ""

This one should work fine. Let me know how it goes.