From fe3d095544802f412c9a72e0a97f7954a8b233bd Mon Sep 17 00:00:00 2001 From: "eoghan.conlon" Date: Tue, 8 Aug 2023 18:22:03 +0100 Subject: [PATCH] Value field type changing implemented --- src/recovery.html | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/recovery.html b/src/recovery.html index bc41296..0e3bfef 100644 --- a/src/recovery.html +++ b/src/recovery.html @@ -8,10 +8,10 @@
- - +

@@ -28,7 +28,15 @@ alert('Not implemented yet'); } - + function selectField(){ + const field = document.getElementById('options').value; + const inputEl = document.getElementById('value'); + if(field === "email"){ + inputEl.type = 'email'; + } else { + inputEl.type = 'text'; + } + }