01-13-2023 23:43 PM
Hello Everyone,
I build this component for text field input in Powerapps. I want it to shared it with anyone who is interested in. I found through my time in building Powerapps really hard to create custom forms that safiscated my needs. Please if its post should be somewhere else let me know. This is the Component:
It has a few inputs and outputs. First Input are optional background shades to make it a bit different. If you insert one inside a form field. Title_Text should be equal to Parent.Displayname, TextInput_Default = Parent.Default.
BorderColor affects Hoverfill effects also. Valid check if true, will check if the input is match to Regex_Valid Value = (^\$?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(.[0-9][0-9])?$) this is a regex for currency input.
If you are new to regex you can find lots of example that you can copy paste in this field in here:
https://regexlib.com/Search.aspx?k=&c=5&m=5&ps=10
And if you want to try to make your on to an specific input you can use this website to doublecheck is correct:
Error Message Text will appear if the regex doesn't much the input. If this Valid_Check is false it will not be shown to user.
Font_Size is the font size.
The whole component is dynamic in size so you can play with the size as you find it fix for your app.
Outputs:
TextOutput is the text that the user enter in the component. In a form you should put it in your update value
And Valid_Output is a true of false if the text in the field match the regex. I used it to make the user able to submit form or not.
If you want to import this component click on the ... next to New Component in your app and select file option.
If you have any question let me know, I hope that this help someone and maybe give an idea for more complex components in the future.