0
It is possible to make that what the user enters in the form is already modified?
Example: It insert "Hi" in <textarea>
and in my results I have a "5 Hi", being the '5 ' inserted 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"
Didn’t work, just filled in the data even put, without adding
If you want this in real time, type, the user type and already replaces on time, only with PHP there is no way, but if you want to do after sending the form, there is how, want to update.
– AnthraxisBR
@Anthraxisbr has a tear.. If it is real time it is necessary to use javascript
– Andrei Coelho
I want that before arriving the answer it is already with something preadded before, I can yes use javascript if they have a solution how to do
– Giovany Henrique