cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Formatting background color in a Html Text control for Email Submission

I have a screen where I placed an HTML Text control that calls data from another screen where the user will enter data into text input controls.

 

I have it all set, but for some reason I cannot get the background color to change. I can change the Fill property, and that will show on the screen, but not in the email it sends out. All other styles in my HTML show up just fine in the email (Like table headers, and alternating row colors).

 

Our company has a specific color scheme, and I would like to set my email submission from the App to match that.

 

Here is the code I have:

"<center><font size='6' style='color:#3053a5'>New Customer</font><br><font size='5'><b>" & EnterNameNC & "</b></Font></center>" &
"<u style='color:#337ab7'><b style=color:#3053a5'>Invoice Account</u></b><br>" &
If(IsBlank(NewInvoiceNameNC), "","<b style=color:#000000'>Invoice Account Name: </b>" & NewInvoiceNameNC  & "<i> (If differnt from Customer Name)</i><br>") &
"<b>Tax Exempt: </b>" & If(TaxExemptNC.Value = true, "Yes <i>(Must submit Tax Exempt Certificate)</i>", "No") & "<br>" &
"<b>Street: </b>" & IAStreetNC & "<br>" &
"<b>City: </b>" & IACityNC & "<br>" &
"<b>State: </b>" & IAStateNC & "<br>" &
"<b>Zip: </b>" & IAZipNC & "<br>" &
"<b>C/O: </b>" & "<b>" & 'IAC/ONC' & "</b><br>" &
"<b>ASM: </b>" & IAasmNC & "<br>" &
"<b>Contact: </b>" & IAContactNC & "<br>" &
"<b>Phone: </b>" & IAPhoneNC & "<br>" &
"<b>Email: </b>" & IAEmailNC & "<br>" &
"<br>" &

"<b style=color:#3053a5'> Locations: </b>" &
"<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>"
&
"<tr style='background-color:#3bafda'>" &
"<th> Branch Name </th> <th> Search Name </th> <th> Street </th> <th> City </th> <th> State </th> <th> Zip </th> <th> TID </th> <th> Contact </th> <th> Phone </th> <th> Cost Center </th> <th> AU </th> <th> BE </th>" &
"</tr>" &
"<tr>" &
"<td>" & If(BranchNameSame.Value = true, EnterNameNC.Text, BranchName1NC.Text) & If(IsBlank(BranchNum1NC), "",  " - " & BranchNum1NC.Text) & "</td>" &
"<td>" & If(And(BranchNameSame.Value = true, IsBlank(SearchName1NC)), EnterNameNC.Text, If(And(BranchNameSame.Value = false, IsBlank(SearchName1NC)), BranchName1NC.Text, SearchName1NC.Text)) &
"<td>" & StreetAddress1NC & "</td>" &
"<td>" & City1NC & "</td>" &
"<td>" & State1NC & "</td>" &
"<td>" & Zip1NC & "</td>" &
"<td>" & TID1NC & "</td>" &
"<td>" & ContactName1NC & "</td>" &
"<td>" & ContactPhone1NC & "</td>" &
"<td>" & CostCenter1NC.Selected.Value & "</td>" &
"<td>" & AU1NC & "</td>" &
"<td>" & BE1NC & "</td></tr>" &
"<tr style='background-color:#d9edf7'>" &
"<td>" & If(BranchNameSame.Value = true, EnterNameNC.Text, BranchName2NC.Text) & If(IsBlank(BranchNum2NC), "",  " - " & BranchNum2NC.Text) & "</td>" &
"<td>" & If(And(BranchNameSame.Value = true, IsBlank(SearchName2NC)), EnterNameNC.Text, If(And(BranchNameSame.Value = false, IsBlank(SearchName2NC)), BranchName2NC.Text, SearchName2NC.Text)) &
"<td>" & StreetAddress2NC & "</td>" &
"<td>" & City2NC & "</td>" &
"<td>" & State2NC & "</td>" &
"<td>" & Zip2NC & "</td>" &
"<td>" & TID2NC & "</td>" &
"<td>" & ContactName2NC & "</td>" &
"<td>" & ContactPhone2NC & "</td>" &
"<td>" & CostCenter2NC.Selected.Value & "</td>" &
"<td>" & AU2NC & "</td>" &
"<td>" & BE2NC & "</td></tr>" &
"<tr>" &
"<td>" & If(BranchNameSame.Value = true, EnterNameNC.Text, BranchName3NC.Text) & If(IsBlank(BranchNum3NC), "",  " - " & BranchNum3NC.Text) & "</td>" &
"<td>" & If(And(BranchNameSame.Value = true, IsBlank(SearchName3NC)), EnterNameNC.Text, If(And(BranchNameSame.Value = false, IsBlank(SearchName3NC)), BranchName3NC.Text, SearchName3NC.Text)) &
"<td>" & StreetAddress3NC & "</td>" &
"<td>" & City3NC & "</td>" &
"<td>" & State3NC & "</td>" &
"<td>" & Zip3NC & "</td>" &
"<td>" & TID3NC & "</td>" &
"<td>" & ContactName3NC & "</td>" &
"<td>" & ContactPhone3NC & "</td>" &
"<td>" & CostCenter3NC.Selected.Value & "</td>" &
"<td>" & AU3NC & "</td>" &
"<td>" & BE3NC & "</td></tr>" &
"<tr style='background-color:#d9edf7'>" &
"<td>" & If(BranchNameSame.Value = true, EnterNameNC.Text, BranchName4NC.Text) & If(IsBlank(BranchNum4NC), "",  " - " & BranchNum4NC.Text) & "</td>" &
"<td>" & If(And(BranchNameSame.Value = true, IsBlank(SearchName4NC)), EnterNameNC.Text, If(And(BranchNameSame.Value = false, IsBlank(SearchName4NC)), BranchName4NC.Text, SearchName4NC.Text)) &
"<td>" & StreetAddress4NC & "</td>" &
"<td>" & City4NC & "</td>" &
"<td>" & State4NC & "</td>" &
"<td>" & Zip4NC & "</td>" &
"<td>" & TID4NC & "</td>" &
"<td>" & ContactName4NC & "</td>" &
"<td>" & ContactPhone4NC & "</td>" &
"<td>" & CostCenter4NC.Selected.Value & "</td>" &
"<td>" & AU4NC & "</td>" &
"<td>" & BE4NC & "</td></tr>" &
"<tr>" &
"<td>" & If(BranchNameSame.Value = true, EnterNameNC.Text, BranchName5NC.Text) & If(IsBlank(BranchNum5NC), "",  " - " & BranchNum5NC.Text) & "</td>" &
"<td>" & If(And(BranchNameSame.Value = true, IsBlank(SearchName5NC)), EnterNameNC.Text, If(And(BranchNameSame.Value = false, IsBlank(SearchName5NC)), BranchName5NC.Text, SearchName5NC.Text)) &
"<td>" & StreetAddress5NC & "</td>" &
"<td>" & City5NC & "</td>" &
"<td>" & State5NC & "</td>" &
"<td>" & Zip5NC & "</td>" &
"<td>" & TID5NC & "</td>" &
"<td>" & ContactName5NC & "</td>" &
"<td>" & ContactPhone5NC & "</td>" &
"<td>" & CostCenter5NC.Selected.Value & "</td>" &
"<td>" & AU5NC & "</td>" &
"<td>" & BE5NC & "</td></tr>" &
"</table>" &
"<br>" &

"<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>"
&
"<tr style='background-color:#3bafda'>" &
"<th> Notes </th>" &
"<tr>" &
"<td>" & NotesNC & "</td>" &
"</tr>" &
"</table>"

 

3 REPLIES 3
Highlighted
Power Apps
Power Apps

Re: Formatting background color in a Html Text control for Email Submission

@FilipK can you help advise? Thanks.

Highlighted
Power Apps
Power Apps

Re: Formatting background color in a Html Text control for Email Submission

HTML Text control is really intended to show HTML text.  We have to strip many style and script attributes that can compromise the look and functionality of the page.  So the control is not really intended to show all HTML.


In your case, you can set the background on the actual control itself.

- not filipk@microsoft.com, please private message me if you can't share with everyone
Highlighted
Anonymous
Not applicable

Re: Formatting background color in a Html Text control for Email Submission

so it is not possible yet to change the background color on the HTML?

 

I was trying to do something like this on my html report. https://www.w3schools.com/html/html_layout.asp

 

Will this feature be avaible?

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,177)