cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nagestiada
Post Partisan
Post Partisan

restrict user to entering HTML tags in text input

How do we restrict users from entering HTML tags on my free text user input and only allowing dash (-)

1 ACCEPTED SOLUTION

Accepted Solutions
iAm_ManCat
Super User
Super User

Disable the submit button if "<" in TextInput.Text or if ">" in TextInput.Text and put a message there that let's them know, that way they won't be able to submit if there's any <> inside the text

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

2 REPLIES 2
chienhsianghung
Advocate II
Advocate II

I was thinking you could do something like...

 

make a popup warning "Please don't use HTML tag. Use dash '-' instead thank you."
in Visible property of Popup:

"<body>" in TextInput.text || "<html>" in TextInput.text ... etc

 

And when you close the popup.
in Onselect property of Popup:

Reset({your TextInput control})

 

Hope it helps 😀

iAm_ManCat
Super User
Super User

Disable the submit button if "<" in TextInput.Text or if ">" in TextInput.Text and put a message there that let's them know, that way they won't be able to submit if there's any <> inside the text

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (2,692)