Copy value from external html form, to a jotform form

  • priovolosilias
    Asked on October 23, 2018 at 4:27 AM

    I have created a form at my wix site that looks like this:


    <form 

    Value: <input type="number" name="per"><br> 

      <button type="submit" formaction="https://form.jotformeu.com/priovolosilias/123456789?input773=per">Submit </button>

    </form>


    I want to copy the value of the field "Value" to my form "https://form.jotformeu.com/priovolosilias/123456789"

    but the code is not working.


    Is there any other way to get the results i want ?

  • roneet
    Replied on October 23, 2018 at 11:26 PM

    You can also do it with any other embed codes (iframe, js embed) the way to do it is to just set it all up for URL prepopulating.

    Now the tricky part here is the part where you are passing the value, because you must add it over PHP or javascript code, depending on what you prefer and have available.

    Using the php code if possible and then just pass that value to number parameter, for example:

    <?php
    $email = '';
    $inputNumber = code_to_get_inputNumber(); //you would need to write this function
    ?>

    <script type="text/javascript" src="//form.jotform.co/jsform/80653147284358?email=<?php echo $inputNumber; ?>"></script>

    Next, if the second method is embedded on the web page, for example, the embed method used is the iFrame method, then you can just use the URL parameter directly on the embedded form URL.

    <iframe
          id="JotFormIFrame-80653147284358"
          onDISABLEDload="window.parent.scrollTo(0,0)"
          allowtransparency="true"
          allowfullscreen="true"
          allow="geolocation; microphone; camera"
          src="https://form.jotformeu.com/80653147284358?input773=per"
          frameborder="0"
          style="width: 1px;
          min-width: 100%;
          height:539px;
          border:none;"
          scrolling="no"
        >
        </iframe>

    Do let us know how it goes.

    Thanks.