How can I get the value from the input field in the form. the idea is to send this value later to the server and display other values associated with it.
<form action="" method="post" autocomplete="off" id="my_form"> <div class="txtb">{{form.date.label}} {{form.date}}</div> <div class="txtb"> <p class="txt"></p></div> <input type="submit" value="send" class="btn" id="btn"> In the Input field I assigned a class="pole" and trying to print value.
$('.pole').on('input', function() { var val = $('.pole').val(); $('.txt').html(val); $('.txt').val(val); }); but this does not work, how can this be done?