Forums

How to load record data from a database table into your form

darkarturo 05 Nov, 2019
Please need read data in several text boxes if I enter a single record value example "DNI" in Chronoform V5.I should load data of db if exist, otherwise, I would make a new registration.
PLEASE HELP ME.







GreyHead 05 Nov, 2019
Hi Darkarturo,

The simplest way to do this is with a two page form and ask for any existing DNI on page 1, then you can load any existing data into the full form on page 2.

You can do it on a single page using JavaScript to make an AJAX query back to the server to get data. You would need some custom JavaScript linked to the DNI input. It would need to check that the DNI format is correct; request the data; handle the event that nothing is found; and handle the event that data is returned but the User has already added data to some of the other inputs.

Bob
darkarturo 05 Nov, 2019
but how do I do that bob, I need your help please, i need one example or help, I would be eternally grateful
This topic is locked and no more replies can be posted.