0
I have a system where the user registration is done through stages:
But when the user enters the name, I want that, as happens here on the site, the name automatically appears in a div next to the form. That’s why I did it this way:
<script>
var nome = document.querySelector('#nome');
var paragrafoNome = document.querySelector('#paragrafonome');
nome.addEventListener('keyup', function () {
paragrafoNome.innerHTML = "<div align='left' style='padding: 10px'><strong>Nome:</strong> <br>" + nome.value + "</div>";
});
</script>
<input id="nome" name="nome" type="text" class="md-form-control required">
<p id="paragrafonome"></p>
Only I realized that this code is conflicting with the jquery of the steps, because when I remove this line:
<script src="assets/plugins/forms-wizard-validation/js/jquery.steps.js"></script>
It works normally, but when I leave this line, the auto-fill stops working. I tried to put the $.noConflict();
before the script, but it disabled the steps.
How can I fix this?
Hello Sam. Right. I confess that I do not know much Jquery. How could I solve this?
– user24136
You may be conflicting with the id
– Sam
Right. I made the adjustments and changed my post with the adjustments made, but unfortunately it doesn’t work. I checked for conflicts with the id, but from what I saw, there’s no other id with the same name.
– user24136
combined......
– user24136
Exchange the
keyup
forinput
to see.– Sam
If it doesn’t work, include the code within this function:
document.addEventListener("DOMContentLoaded", function(){ COLOQUE O CÓDIGO AQUI });
– Sam
Hello Sam. Unfortunately the conflict continues. I decided to change the shape of the steps and stick with the solution you gave me. Thank you!
– user24136
Only for those who want to apply the idea, I used the step Wizard of this link: https://bootsnipp.com/snippets/j6rkb Worked without conflicts.
– user24136