Transcript
In this Quick Tip, we’re going to learn about the text transform operators.
When users submit things to your app like their names products or whatever it is you want them to, you may want to format how it is displayed back to your users so they don’t have to.
Here, we have an input field for the user to type anything they want and a text element to display what they typed in. So if user entered this into an input, that’s what will show in the text element. Fortunately, we can format this using some text transform operators.
We can add an operator to the final output like :lowercase, which will take any characters the user submits, and convert it all to lowercase letters. Now when we type it in, this text element will transform whatever was written to lowercase because of this operator.
We can take this step further and add another text transform operator onto this called :capitalized words. This operator will now capitalize the first letter in each new word. With both of these operators on the final output, we're protected for most situations.
These operators are frequently used wherever you have user input. There’s even an :uppercase operator which would turn each character in word to uppercase letters.
Controlling the format of user-submitted text can be key when storing it in your database. You can apply these operators in your workflow like so.
So experiment with text transform operators as you build your app.
That's it for this Quick Tip! For more, be sure to check out bubble.io/academy.