What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Update a Form Field from a PHP Script or in HTML

    Asked by nickbh on October 05, 2015 at 09: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

     

    form field OR in update a form field
  • Profile Image
    JotForm Support

    Answered by Chriistian on October 06, 2015 at 02: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.

  • Profile Image

    Answered by nickbh on October 06, 2015 at 05: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

     

  • Profile Image
    JotForm Support

    Answered by Chriistian on October 06, 2015 at 05: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.