Mirror input field to a text field on keyboard strokes

Hey, what’s up man. Crazy you posted this because I am actually making a cloneable project that has this exact thing.

Anyhow, try adding this to the custom code in the footer section in settings on your page:

<script>
var inputBox = document.getElementById('text-input');

inputBox.onkeyup = function(){
    document.getElementById('text-reflect').innerHTML = inputBox.value;
}
</script>

So for the field I want to mirror I have an id of “text-input” on it.
Then create another div (you don’t have to put anything inside of it) and style it the same way you would another input field or how you have it with the light blue and give that div an id of “text-reflect”.

Should work fine. Hope this helps :grin:

2 Likes