Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +4 -2
templates/index.html
CHANGED
@@ -121,8 +121,10 @@
|
|
121 |
recognition.onresult = function(event) {
|
122 |
let transcript = event.results[0][0].transcript.trim();
|
123 |
|
124 |
-
|
125 |
-
|
|
|
|
|
126 |
|
127 |
// Remove unwanted spaces from the email input
|
128 |
emailInput.value = transcript;
|
|
|
121 |
recognition.onresult = function(event) {
|
122 |
let transcript = event.results[0][0].transcript.trim();
|
123 |
|
124 |
+
// If name is captured, we now capture email
|
125 |
+
if (isNameCaptured && !isEmailCaptured) {
|
126 |
+
// Correct email input format by removing spaces and handling @ properly
|
127 |
+
const cleanedEmail = transcript.replace(/\s/g, '').replace('@', ' @ '); // Keep space around '@' properly
|
128 |
|
129 |
// Remove unwanted spaces from the email input
|
130 |
emailInput.value = transcript;
|