Textbox type Telephone/Number

Get help using Construct 2

Post » Wed Apr 17, 2013 6:40 am

Hi,
I have added a Textbox to my project and set its "Type" property as Telephone, I also tried using "Type":Number but both these are behaving the same as "Type":Text. I am seeing no change in behaviour. What I really expected was that it would take only numeric input or number with dash for telephone.

When type is set to Telephone I see that a scrollbar also gets added to the Textbox by default, could you please help resolve this... ?

-Thanks
B
10
S
3
Posts: 69
Reputation: 1,590

Post » Wed Apr 17, 2013 9:44 am

You got a browser that supports html 5?

If you see the buttons you call "scrollbar", I think yes.

And yes the Textboxes should only accept numbers, telephon also "+".

Here is a reference, scroll down until you find number and tlephone to see what they are doing. LINK

If you dont like the arrows use the "set custum css" action in Construct 2 to change this ;) Informations about thatDarklinki2013-04-17 09:45:28
B
15
S
6
G
6
Posts: 512
Reputation: 5,550

Post » Wed Apr 17, 2013 3:11 pm

Thanks @Darklinki but I was expecting this to work out of box in C2 as it is already taking input for these properties.

Setting them through CSS would be double work, not that I don't want to do it but I just wanted to know whether its supported and working in C2 out of box or not.

-Thanks
B
10
S
3
Posts: 69
Reputation: 1,590

Post » Wed Apr 17, 2013 4:08 pm

Setting the input type to 'tel' doesn't do anything in most browsers. It pops up the numeric input on some mobile devices but that's about it.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Thu Apr 18, 2013 6:42 am

Thanks @ramones, I wanted to write some validation for the telephone input like: Alphabets should not be keyed in. I used a workaround which seems to work, workaround was to take the text input in int(Textbox.text) which returns 0 if alphabets is inputted.
B
10
S
3
Posts: 69
Reputation: 1,590


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 21 guests