title: assign value from two input to a single input type hidden
body: <p>I am trying to get the value of first input or second input and assign it to a hidden input type. When the value updates from the above default value.</p>
  <p>HTML</p>
  <pre><code> &lt;input id=&quot;amount2&quot; name=&quot;s_value6&quot; type=&quot;number&quot; value=&quot;48&quot;&gt;
   &lt;input id=&quot;amount3&quot; name=&quot;s_value11&quot; type=&quot;number&quot; value=&quot;500&quot;&gt;
   &lt;input id=&quot;mak&quot; type =&quot;hidden&quot; name=&quot;distance&quot; value=&quot;&quot;&gt;
  </code></pre>
  <p>jQuery</p>
  <pre><code>if(mafsForm.find(&quot;#amount3&quot;).val().length !== 0 || mafsForm.find(&quot;#amount2&quot;).val().length !== 0) {
        var s_value11 = mafsForm.find(&quot;#amount3&quot;).val(); 
        var s_value6 = mafsForm.find(&quot;#amount2&quot;).val(); 
        var dist = $('#mak').val($(this).val());
  }
  </code></pre>