Update a Form Field from a PHP Script or in HTML

  • nickbh
    Asked on October 5, 2015 at 9:06 PM

    Hi,

    I am working with a few forms and need to be able to update the content on a form when the form has loaded?  I am familiar with passing parameters through the URL , which works fine.  However in one instance the parameter is just far too long and reaches the limit of an allowed URL. (ie 2500 Chars)

     

    As a result I want o be able to "pull the data" using a PHP Script and update the field on the form to include that data?  I have succesfully written the script but I am unsire if A) its possible and B) how to integrate it into the Jotform?

     

    If this is not possible do you have another solution I can consider?

     

    Thanks

     

  • Chriistian Jotform Support
    Replied on October 6, 2015 at 2:51 AM

    Hi,

     

    Unfortunately, we cannot add a PHP script or modify the HTML code of your form in JotForm. What you can do is to download the the full source code of your form and then you can modify the source code as needed. You can check this guide to get the full source code of your form: How to get the Full Source Code of your Form.

     

    Do let us know if you need further assistance.
    Regards.

  • nickbh
    Replied on October 6, 2015 at 5:12 AM

    Hi Chriistian,

    I understand form a little more reading that should I POST the data, rather than use query strings, that the post data sits in the header so does not have an impact on the URL Length.  

    I can set-up a web hook that POSTS he data directly.  If I approached my issue by using this method, can I populate the form fields in that way.  

    Ie can you populate the form fields using the POST method?

     

    Thanks

    Nick

     

  • Chriistian Jotform Support
    Replied on October 6, 2015 at 5:38 AM

    Hi Nick,

     

    If I understand you correctly, you want to pre-populate your form using POST method/PHP script (POST method/PHP Script/Webhook to JotForm), unfortunately, this is not possible within JotForm. You will need to program this to be able to achieve this as mentioned above. If you are trying to get the data from your Form and save it to your own database, you can use the Send Post Data method or Webhook (JotForm to POST method/PHP Script/Webhook). 

     

    Do let us know if you have further question.
    Regards.