Welcome Guest, Not a member yet? Register   Sign In
How to get one form_input to show up in another?
#4

jQuery is your best friend.
Load the jQuery library in your page's head section.
Then, at the bottom of your page (preferrably after the </body> tag):
Code:
<script>
$(document).ready(function() {
  $('#input1').keyup(function() {
      var text = $('#input1').val();
      $('#input2').val(text);
  });
});
</script>
In this example, "input1" is the id attribute of the input where the user is typing text, and "input2" is the id of the second field where you want to show the text that is being typed.
More info: https://api.jquery.com/keyup/
Reply


Messages In This Thread
RE: How to get one form_input to show up in another? - by Wouter60 - 04-18-2016, 10:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB