Jul 02, 2020 05:22 PM
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>
Solved! Go to Solution.
Jul 02, 2020 08:50 PM
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?
Jul 02, 2020 08:50 PM
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?
Jul 04, 2020 04:15 PM
This community is so great!
Thank you