title: Get a value from a JS script and pass it to a HTML Form
body: <p>I don`t find out how to get the value from the js script input ( phone number that user input , and the country prefix code that the script auto put )</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>  &lt;script src="{% static 'assets/js/intlTelInput.js' %}"&gt;&lt;/script&gt;
    &lt;script&gt;
      var input = document.querySelector("#phone");
      window.intlTelInput(input, {
        initialCountry: "gb",
      });
    &lt;/script&gt;
  
  and have it saved thru my HTML form under this:</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>  &lt;input type="tel" name="phone-number" class="form-control input-style" placeholder="your phone"&gt;
    &lt;input type="tel" id="phone"&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Full code :</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;form class="submit-form" method="post" action="{% url 'register' %}" enctype="application/json"&gt;
    {% csrf_token %}
  
  &lt;div class="div-block"&gt;
  &lt;div class="double-fields-step-2-only"&gt;
  &lt;div class="form-group"&gt;
  &lt;div class="form-group right"&gt;
    &lt;input type="tel" name="phone-number" class="form-control input-style" placeholder="your phone"&gt;
    &lt;input type="tel" id="phone"&gt;
  
    &lt;script src="{% static 'assets/js/intlTelInput.js' %}"&gt;&lt;/script&gt;
    &lt;script&gt;
      var input = document.querySelector("#phone");
      window.intlTelInput(input, {
        initialCountry: "gb",
      });
    &lt;/script&gt;
    &lt;div class="icon"&gt;&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;button type="submit" class="btn btn-register" data-title="Loading..."&gt;
  Register
  &lt;/button&gt;
  &lt;/form&gt;&lt;/div&gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>