Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
raienko committed Apr 13, 2024
1 parent bf33e2b commit c9cf7ec
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions Vi14/ContactUs.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,6 @@
});
}
</script>

<script type="text/javascript">(function(){
const searchParams = new URLSearchParams(window.location.search);
const params = ['name', 'email', 'subject', 'message', 'userId'];
params.forEach(key => {
const input = document.getElementById(key);
input.value = searchParams.get(key);
});
})();</script>

</head>
<body>

Expand Down Expand Up @@ -84,5 +74,17 @@ <h3>Contact us</h3>
</form>
</div>

<script type="text/javascript">(function(){
const searchParams = new URLSearchParams(window.location.search);
const params = ['name', 'email', 'subject', 'message', 'userId'];
params.forEach(key => {
const input = document.getElementById(key);
input.value = searchParams.get(key);
if (key === 'subject' && !input.value) {
input.value = 'help'
}
});
})();</script>

</body>
</html>

0 comments on commit c9cf7ec

Please sign in to comment.