unable to use spaces in a textbox


unable to use spaces in a textbox

Author
Message
Robert Balas
Robert Balas
Esteemed Member
Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.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
Supreme Being (428K reputation)Supreme Being (428K reputation)Supreme Being (428K reputation)Supreme Being (428K reputation)Supreme Being (428K reputation)Supreme Being (428K reputation)Supreme Being (428K reputation)Supreme Being (428K reputation)Supreme Being (428K reputation)

Group: Administrators
Posts: 8.9K, Visits: 38K
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
Esteemed Member
Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.4K reputation)Esteemed Member (2.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


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search