Friends, I have an application that captures information from a textbox and sends it through a url to a PHP pgm. What’s happening? When the url is created, and the text has a line break (CR) it generates an error. Is there a component that ensures that there are no foreign characters for a URL?
You can check if a particular symbol/charater is in given string or not by contains
block
https://docs.kodular.io/blocks/text/#contains
And then if there is any such thing, then you can replace that using replace all
block
Thank you very much. In this case I would have to create several replaces, one for each character. Isn’t there a component that solves this situation with just one block?
You can use a loop.
Btw, can you tell me what character are not allowed?
You’re right. Thanks a lot for the help.
Here is an example of how you do it:
label3.text is your text, and contain text is all the text you allowed.
The variable result will be the result.
But how would I test line feed (CR) on the text typed in the textbox multiple lines field?
I supposed line feed = line break?
If yes, line break is “\n”
I will test. Thank you very much.
Use regex
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.