title: jQuery how display as variables in text fields
body: <p>This is my JavaScript function</p>
  
  <pre><code>$(document).ready(function() {
      (function($) {
          $.fn.calculateMortgage = function(options) {
              var defaults = {
                  params: {}
              };
              var calculate = function(params) {
                  params = $.extend({
                      benzyna: 0,
                      gaz: 0,
                      sp_benz: 0,
                      przebieg: 0,
                      cena_inst: 0
                  }, params);
                  var N = params.benzyna * params.sp_benz;
                  var I = (+(params.sp_benz * 0.15)) + (+(params.sp_benz));
                  var J = params.gaz * I;
                  var K = (((params.cena_inst) / (N - J)) * 100);
                  var L = params.przebieg / 12;
                  var L1 = K / L;
                  var M = (L / 100 * (N - J));
  
                  var R = (M * 12);
                  var result = N;
                  return result;
              };
              return this.each(function() {
                  var $element = $(this);
                  var $result = calculate(options.params);
                  var output = '&lt;p&gt; koszt przejazdu na 100km = ' + $result.toFixed(2) + '&lt;/p&gt;';
                  $(output).appendTo($element);
              });
          };
      })(jQuery);
      $(function() {
          $('#test').on('submit', function(e) {
              e.preventDefault();
              var $params = {
                  benzyna: $('#benzyna').val(),
                  gaz: $('#gaz').val(),
                  sp_benz: $('#sp_benz').val(),
                  przebieg: $('#przebieg').val(),
                  cena_inst: $('#cena_inst').val()
              };
              $(this).calculateMortgage({
                  params: $params
              })
          });
      });
  });
  </code></pre>
  
  <p>And this is code when I use visible value</p>
  
  <pre><code>&lt;div class="container-fluid"&gt;
      &lt;form role="form"&gt;
          &lt;div class="form-group"&gt;
              &lt;div class="row"&gt;
                  &lt;label class="col-xs-5 col-sm-4" for="exampleInputEmail1"&gt; 100km&lt;/label&gt;
                  &lt;input class="col-xs-5 col-sm-4" type="text" id="exampleInputEmail1"
                      class="form-control" placeholder=" "&gt;
                  &lt;label class ="col-xs-2 col-sm-4" for="exampleInputEmail1"&gt; ...&lt;/label&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to display the values of individual variables in separate text boxes. Such as the Internet helped me to get variables from a text field and perform operations on them. But now I have to show them in the appropriate fields of the form. How to do it?
  Thanks</p>