Help

Upcoming database upgrades. to improve our reliability at 03:30 UTC on Feb. 25 / 7:30pm PT on Feb. 24. Some users may briefly experience slow load times or error messages. Learn more here

Help pulling info to create a HTML

Topic Labels: Scripting extentions
Solved
Jump to Solution
1901 2
cancel
Showing results for 
Search instead for 
Did you mean: 

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>
1 Solution

Accepted Solutions

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. :slightly_smiling_face:

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?

See Solution in Thread

2 Replies 2

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. :slightly_smiling_face:

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?

This community is so great!
Thank you