How do I pass initial field values via POST method

  • VolleyballQLD
    Asked on August 30, 2016 at 12:13 AM

    I wish to provide a membership renewal service where a users data is pre-populated using data from a webpage/database. I do not wish to use URL parameters as the data passed (some potentially confidential) is cached, logged, limited in size, etc. I want to pass the data via a post mechanism.  I have been unable to find reference to how to pass POST data into jotform. I have a test form on our website that uses GET method successfully but does not work when changed to use the POST method.

  • BJoanna
    Replied on August 30, 2016 at 5:55 AM

    If I understood you correctly you want to prepopulate your form with data that is stored in your database. 

    To achieve this  you can create a custom program using server side programming like PHP to create an interface/connection to pull data from your database to the form fields. You will also need to use the form's full source code then.

    As an alternative you can use our Field Prepopulate app.

    I also did a bit of google search and found this 

    how-to-populate-php-html-form-with-mysql-data

    Hope this will help. Let us know if you need further assistance.

  • VolleyballQLD
    Replied on August 30, 2016 at 9:14 PM

    Rats. I was hoping you system supported the POST method. I already have it working with the GET method and was hoping an easy change of method was all that was needed. (In PHP terms, I was hoping you used the $_REQUEST[] data and not just the $_GET[] data)

    Source code embedding is not an option for us as it prevents us from using the form editor to make changes to the forms (without the effort required to re-embed the adjusted form).

    The Field Prepopulation App is not really an option as also uses the GET method of passing data to Jorform.

    So if I understand correctly, there is no support for accepting initial values via POST method, only the GET method is supported. :(

  • liyam
    Replied on August 31, 2016 at 2:57 AM

    Hello VolleyballQLD,

    You can enable post data submissions in your form. Here are some user guides that illustrates how to enable them: 

    https://www.jotform.com/help/213-Send-POST-Data-From-JotForm-Using-PHP-in-Custom-Thank-You-Page

    https://www.jotform.com/help/51-How-to-Post-Submission-Data-to-Thank-You-Page

    Another alternative method is to use Webhook in order to send post data via back-end. This user guide explains how to use it: https://www.jotform.com/help/245-How-to-Setup-a-Webhook-with-JotForm

    If you have further questions, please let us know.

    Thanks.

  • liyam
    Replied on August 31, 2016 at 3:21 AM

    Oh wait... I'm sorry I misunderstood. Unfortunately there is no way for your forms to prepopulate via stand-alone form from receiving post or get submission from a 3rd party source. So what you can do in order for your form to handle requests is is how BJoanna explained it by getting your form's full HTML source and place it on your own page and code your script there.

    Thanks.