appie21 Active Member Licensed User Longtime User Aug 17, 2015 #1 Hello I try to safe data from a Edittext (multiline) If the user fill nothing in that EditTextbox i give a message If EditText.text = "" Then Messagebox("Fill in the form", "Hello") But if the user press the enter key once or more times it place emty lines in my Edit textbox (and no more text) The code "If EditText.text = "" Then" will not work (because EditText.text.Length give 1 or more How can I set a Messagebox to a "visual" emty Edittextbox?
Hello I try to safe data from a Edittext (multiline) If the user fill nothing in that EditTextbox i give a message If EditText.text = "" Then Messagebox("Fill in the form", "Hello") But if the user press the enter key once or more times it place emty lines in my Edit textbox (and no more text) The code "If EditText.text = "" Then" will not work (because EditText.text.Length give 1 or more How can I set a Messagebox to a "visual" emty Edittextbox?
eurojam Well-Known Member Licensed User Longtime User Aug 17, 2015 #2 you can replace the line feed before you do your code like this: B4X: txt = EditText.text txt = txt.replace(CRLF, "") If txt = "" Then Messagebox("Fill in the form", "Hello") ... end if Upvote 0
you can replace the line feed before you do your code like this: B4X: txt = EditText.text txt = txt.replace(CRLF, "") If txt = "" Then Messagebox("Fill in the form", "Hello") ... end if