]> git.cworth.org Git - lmno.games/commitdiff
Refine the Game ID input field
authorCarl Worth <cworth@cworth.org>
Sat, 16 May 2020 22:38:02 +0000 (15:38 -0700)
committerCarl Worth <cworth@cworth.org>
Sat, 16 May 2020 22:38:02 +0000 (15:38 -0700)
Here we restrict it to 4 characters, force the input to uppercase,
disable autocomplete (since we don't expect intentional reuse of game
ID codes), and provide some instruction in the placeholder.

index.html

index bb9367ffb7e3b313901a16822f7a2c93049dce4a..0546dd703bd9636568176118c84d330bac2fed6b 100644 (file)
 
         <div class="form-field large">
           <label for="id">Game ID</label>
-          <input type="text" id="id" required>
+          <input type="text" id="id" maxlength="4"
+                 placeholder="Enter a 4-letter Game Code"
+                 oninput="this.value = this.value.toUpperCase()"
+                 autocomplete="off"
+                 required>
         </div>
 
         <div class="form-field large">