- zennclosetAsked on February 10, 2015 at 11:05 AM
I have set up a test database at db4free.net but I do not know how to obtain the values from the table I have created there. In my form, I have set up a simple textbox to obtain the ItemCode. Then I want to check in the database for the same itemcode and return the value of it's price. Please assist me further to achieve this thanks!
I have set up my post data and I have placed sample values such as abc12345 in db4free and the price in integer, 50. I know that I have to code a php file to achieve this but after done so, where should i upload it? I am new to this and I hope you can guide me further.
- BenAnswered on February 10, 2015 at 12:13 PM
I would like to confirm what you would like to achieve first.
It seems to me that you are looking to create ajax calls to db4free.net website and then have the data from there added to the fields on your jotform.
Can you please confirm if this is what you are after, or if you are looking to save the data from the jotform to the database instead?
- zennclosetAnswered on February 10, 2015 at 01:25 PM
Yes I am trying to get data from the database and then add to the "read-only textbox" as "Price".
- BenAnswered on February 10, 2015 at 01:53 PM
OK, thank you for confirmation.
Now unfortunately that would require AJAX and as such it is not possible to do at this time.
What you could do is to pre-populate hidden fields over URL, but as such this is pre-set not live update as I believe you are after.
Please check here more about the pre-populating, if that might work for you: Prepopulating fields to your JotForm via URL parameters
If you can give us more details on what you would like to have happening on your jotform, we might be able to offer some alternative or app/widget that could help you achieve it.
- zennclosetAnswered on February 11, 2015 at 04:48 AM
I see. Thank you for the clarification.
Does that mean I can only save data to my database?
- BenAnswered on February 11, 2015 at 08:21 AM
Yes, that is correct. You can only save the data that is submitted over the jotform, not retrieve the data to it once it is opened.
If you would like us to help you in regards to the setup to save the submitted data to the database do let us know and we would be happy to assist.