title: How to select input value from onchange using jQuery?
body: <p>I have a select and input tags. I am updating a value of a text input based from what is selected in the select tag.</p>
  
  <p>Select Tag</p>
  
  <pre><code>&lt;select class="form-control form-field-username form-field-users"&gt;
  &lt;option class="form-field-first-option" value="0" selected="selected"&gt;Select User...&lt;/option&gt;
  &lt;option value="1"&gt;Peter Fel&lt;/option&gt; 
  &lt;option value="2"&gt;Mark Getty&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Input Tag</p>
  
  <pre><code>&lt;input name="user_id" id="user_id" class="form-control form-field-user-id" type="number"&gt;
  </code></pre>
  
  <p>Code for onchange select:</p>
  
  <pre><code>$('.form-field-username').change( function() {
      $(this).find(":selected").each(function () {
          var userId = $(this).val();
  
          $('.form-field-user-id').val(userId);
  
      });
  
  });
  </code></pre>
  
  <p>I want to set the value of text input with user id of "user_id" to null or undefined if the onchange chooses the first value or user_id == 0.</p>
  
  <p>Do you know how to modify the code? Any help is appreciated. Thanks</p>