Help pulling info to create a HTML

I would like to fill a field that results in this HTML text The items in italics are Airtable fields within that Airtable table

<!DOCTYPE html>
<html>
<body>
<h4 style="text-align:center;">*Workshop Title* </h4>
<p style="text-align:center;">*text Date Range Friendly*
<br>*Text Bottomline*
<br>*Medium*
</body> </p>
</body>
</html>

FWIW, your italicised items didn’t appear as such because you formatted the entire block as preformatted text, which doesn’t allow any other formatting inside it. That aside, I can see the asterisks around certain parts, so I know what you were going for. :slight_smile:

You added this thread to the Scripting block category, but the Scripting block isn’t required to pull this off. You can build HTML using Airtable’s formula fields. I’ve done this on numerous occasions, and it works quite well. Just be aware that if you want to add line breaks, you’ll need to insert the newline escape code ("\n") in each of those places.

To make creation of the formula a little easier, I suggest building it in a plain text editor, which will let you format it like this:

'<!DOCTYPE html>\n
<html>\n
<body>\n
<h4 style="text-align:center;">' & {Workshop Title} & '</h4>\n
<p style="text-align:center;">' & {text Date Range Friendly} & '\n
<br>' & {Text Bottomline} & '\n
<br>' & {Medium} & '\n
</body> </p>\n
</body>\n
</html>'

Does that make sense?

2 Likes

This community is so great!
Thank you

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.