The app I'm building uses a Sharepoint List which has a Yes/No column.
I'm using an HTML Text control to build the HTML that will be saved by a Flow and then converted to a .PDF by the same flow. What do I need to add to the HTMLText box to show a checked checkbox when the value in the List is Yes? Note that I am not looking to have the user interact with the HTML file, it's just being used for a report.
Solved! Go to Solution.
Resources:
https://www.w3schools.com/tags/att_input_checked.asp
https://powerusers.microsoft.com/t5/Building-Power-Apps/HTML-formatting-with-variables/td-p/706038
Source Data:
Checked based on "Active" column:
Code:
"<input type=""checkbox"" name=""vehicle1"" value=""Bike""" & If(First(People).Active, " checked") & ">
<label for=""vehicle1""> I have a bike</label><br>"
Edit: If you don't want users to be able to toggle it, you can also use the disabled property, but you may need to add extra formatting to change the appearance: https://www.w3schools.com/tags/att_input_disabled.asp
"<input type=""checkbox"" name=""vehicle1"" value=""Bike""" & If(First(People).Active, " checked") & " disabled>
<label for=""vehicle1""> I have a bike</label><br>"
Resources:
https://www.w3schools.com/tags/att_input_checked.asp
https://powerusers.microsoft.com/t5/Building-Power-Apps/HTML-formatting-with-variables/td-p/706038
Source Data:
Checked based on "Active" column:
Code:
"<input type=""checkbox"" name=""vehicle1"" value=""Bike""" & If(First(People).Active, " checked") & ">
<label for=""vehicle1""> I have a bike</label><br>"
Edit: If you don't want users to be able to toggle it, you can also use the disabled property, but you may need to add extra formatting to change the appearance: https://www.w3schools.com/tags/att_input_disabled.asp
"<input type=""checkbox"" name=""vehicle1"" value=""Bike""" & If(First(People).Active, " checked") & " disabled>
<label for=""vehicle1""> I have a bike</label><br>"
Thanks, this is perfect. I guess I have to teach myself CSS now to have it not look like roadkill. 🙂