title: Get Value from JQuery Modal Dialog Submit to another Input Type
body: <p>I am so poor with JQuery &amp; Javascript.</p>
  
  <p>I have a two simple forms. One as primary form with an input type text &amp; and a hyperlink. Another form as JQuery Modal Dialog with select option list.<br/></p>
  
  <p>All I want to do is:</p>
  
  <p>If user click the hyperlink <code>&lt;a&gt;See Milk&lt;/a&gt;</code> from the primary form, then will showing a JQuery Modal Dialog.</p>
  
  <p>Then if the option list are selected from the Modal Dialog &amp; click Submit, it should closing the Modal Dialog &amp; showing the value on the input type at primary form.</p>
  
  <p>Here is the HTML of Primary Form:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;form action="milk.php" id="milk_form"&gt;
    &lt;input type="text" name="milk_input_name" id="milk_input_id" class="milk_input_class" value=""&gt;&lt;br/&gt;
    &lt;a id="milk_a_id" class="milk_a_class" data-target="#milk_modal" data-toggle="modal" href=""&gt;See Milk List&lt;/a&gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here is the HTML of Modal Form:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;form action="milk.php" id="milk_form"&gt;
    &lt;input type="text" name="milk_input_name" id="milk_input_id" class="milk_input_class" value=""&gt;&lt;br/&gt;
    &lt;a id="milk_a_id" class="milk_a_class" data-target="#milk_modal" data-toggle="modal" href=""&gt;See Milk List&lt;/a&gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>