commit 1fce673292908a7774a721bc7dc4b642e8a7d5ab
parent 6bab86e301dbd97fd8ce4ce0adb03b3a4f94ccdd
Author: Samir Parikh <noreply@samirparikh.com>
Date: Thu, 24 Feb 2022 15:41:37 +0000
update text field attributes to force numeric keypad on mobile
when guessing numbers
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/guess_number.cgi b/guess_number.cgi
@@ -139,6 +139,8 @@ sub show_guess_form {
print $game->start_form( -name => 'gf' );
print "Your guess: ";
print $game->textfield (
+ -inputmode => 'numeric', # force number pad on mobile
+ -pattern => '[0-9]*', # force number pad on mobile
-name => 'guess',
-value => '',
-override => 1