From 4a42f460890676dc5cc0084d6fc736c17d63385f Mon Sep 17 00:00:00 2001 From: "eoghan.conlon" Date: Sun, 30 Jul 2023 00:05:29 +0100 Subject: [PATCH] [Modify user] Field selector scripted to modify & revert form elements for email input check #1 --- src/modify.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/modify.html b/src/modify.html index a168282..59fc8dd 100644 --- a/src/modify.html +++ b/src/modify.html @@ -12,7 +12,7 @@
- @@ -58,6 +58,16 @@ document.getElementById('formStatus').innerHTML = "Please select a field to modify"; } } + + function selectField(){ + const field = document.getElementById('field').value; + const value = document.getElementById('value'); + if(field === 'mail'){ + value.type = 'email'; + } else { + value.type = 'text'; + } + }