My small html snippet does not show up

Hey there. I have an element called “Business” a user can create and edit. It’s a list item filtered by a user ID (because one user may have several businesses). A user can also choose from social media icons which are then shown via a small html snippet I create via Airtable. Eventually I want to create a row of social media icons with custom links to websites & profiles.


The code in my Airtable column is:

<table vertical-align="center"><tr><td width="45px"><img src="LINK TO IMAGE" alt="Social Media"></td><td width="45px"></td><td width="45px"></td></tr></table>

You see in the screenshot above, it works. Still ugly, but it does.

Users can create projects. Every project has a relation to a business and I display data in Airtable through a lookup field. But somehow my icon list html DOES NOT display here. Though it’s still the same, right?


I tried the embed field, too, and also several other list and list detail templates. Where does html work? Is it because of the Airtable lookup? Is there a limitation in dynamic html code from Airtable?
I am still thinking about building some (very basic) dynamic html stuff in Airtable fields to work around some of the Softr template limitations…

I have run into this before. I believe the problem is because airtable sometimes has to infer the data type of a field, specifically when it’s a lookup or formula field. From memory, I believe I have worked around it by creating a formula field that has triple back quotes at the beginning and end of the formula. Give that a try and if it does not work I can go look up the workaround and see if there’s more to it.

1 Like

@christian_k did it work out ?

Yes, @dcoletta it’s the lookup field. I added an html-tag and it worked for the lookup field, but when I added it to the original field, it didn’t work for both the original field and the lookup field. So you have to add the html-tag to all lookup or formula fields, I guess. Now it works.

My original html snippet (which only works for display in the business entry) looks like this in Airtable:

'<table vertical-align="center"><tr><td width="45px">' & {inserting an img from another field} & '</td></tr></table>'

When I use the lookup on another elements, like projects, I added a formula in Airtable which adds html-tags and looks like this:

"<html>" & {Icon List HTML (from Business)} & "</html>"