unable to use spaces in a textbox


Author
Message
Robert Balas
Robert Balas
Guru (5.4K reputation)Guru (5.4K reputation)Guru (5.4K reputation)Guru (5.4K reputation)Guru (5.4K reputation)Guru (5.4K reputation)Guru (5.4K reputation)Guru (5.4K reputation)Guru (5.4K reputation)
Group: Forum Members
Posts: 38, Visits: 85
Hi there!
That's weird. I need to have a textbox in a script where participants might freely enter their questions or remarks. I did that:

<textbox mess>
/ caption = "Poniżej możesz wpisać swoją wiadomość do Autora tego badania."
/ mask = alphabetic
/ textboxsize = (80, 40)
/ subcaptionfontstyle = ("Arial", 1.90%, false, false, false, false, 5, 0)
/ responsefontstyle = ("Arial", 1.33%, false, false, false, false, 5, 0)
/ required = false
/ multiline = true
</textbox>

But the thing is that when entering the text into it, it doesn't allow spaces between words. What? Why? I don't get it really. Can anybody help me with that?

Robert
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
RBalas - Sunday, February 25, 2018
Hi there!
That's weird. I need to have a textbox in a script where participants might freely enter their questions or remarks. I did that:

<textbox mess>
/ caption = "Poniżej możesz wpisać swoją wiadomość do Autora tego badania."
/ mask = alphabetic
/ textboxsize = (80, 40)
/ subcaptionfontstyle = ("Arial", 1.90%, false, false, false, false, 5, 0)
/ responsefontstyle = ("Arial", 1.33%, false, false, false, false, 5, 0)
/ required = false
/ multiline = true
</textbox>

But the thing is that when entering the text into it, it doesn't allow spaces between words. What? Why? I don't get it really. Can anybody help me with that?

Robert

/ mask = alphabetic

implements a regular expression under the hood. That regular expression does not match white space characters (and isn't supposed to). You can do

/ mask = ^[a-zA-Z\s]+$

Also see https://www.millisecond.com/forums/Topic5978.aspx if you need to need to match other characters as well (e.g. letters with diacritics or accents).


Robert Balas
Robert Balas
Guru (5.4K reputation)Guru (5.4K reputation)Guru (5.4K reputation)Guru (5.4K reputation)Guru (5.4K reputation)Guru (5.4K reputation)Guru (5.4K reputation)Guru (5.4K reputation)Guru (5.4K reputation)
Group: Forum Members
Posts: 38, Visits: 85
Dave - Monday, February 26, 2018
RBalas - Sunday, February 25, 2018
Hi there!
That's weird. I need to have a textbox in a script where participants might freely enter their questions or remarks. I did that:

<textbox mess>
/ caption = "Poniżej możesz wpisać swoją wiadomość do Autora tego badania."
/ mask = alphabetic
/ textboxsize = (80, 40)
/ subcaptionfontstyle = ("Arial", 1.90%, false, false, false, false, 5, 0)
/ responsefontstyle = ("Arial", 1.33%, false, false, false, false, 5, 0)
/ required = false
/ multiline = true
</textbox>

But the thing is that when entering the text into it, it doesn't allow spaces between words. What? Why? I don't get it really. Can anybody help me with that?

Robert

/ mask = alphabetic

implements a regular expression under the hood. That regular expression does not match white space characters (and isn't supposed to). You can do

/ mask = ^[a-zA-Z\s]+$

Also see https://www.millisecond.com/forums/Topic5978.aspx if you need to need to match other characters as well (e.g. letters with diacritics or accents).


Many Thanks!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search