Is it possible to make what the user inserts into the form already modified?
Example: It inserts "Hi" in <textarea>
and in my results I have a "5 Hi", being '5' entered by myself through code.,
Excerpt from what I tried for the answers:
let comment = document.getElementById('comment')
let valorAdicional = '5'
let valorDigitado = ''
comment.onkeyup = function(){
comment.value = valorAdicional + comment.value
}
textarea id="comment" maxlength="500"
input type="submit" name="post_comment" value="Enviar"
It did not work, just filled in with the data even put, without adding