Hello! Can you point me in the direction of a turorial/article of how I can populate a form from an URL address?
For example, I want specific users to update his/her data and have a number of data elements for that user that I already have to be pre-populated on the form for his review/edit.
Thanks!
For example, I want specific users to update his/her data and have a number of data elements for that user that I already have to be pre-populated on the form for his review/edit.
Thanks!
Hi bobjanes,
If they are logged in users you can use their User ID to retrieve data (there's a FAQ on getting the ID); if you have a value in the calling URL it will be automatically added to the $form->data array.
In either case you can use a DB Record Loader to retrieve data from a database table and, provided that the column names match the input names that will be republished in your form.
Bob
If they are logged in users you can use their User ID to retrieve data (there's a FAQ on getting the ID); if you have a value in the calling URL it will be automatically added to the $form->data array.
In either case you can use a DB Record Loader to retrieve data from a database table and, provided that the column names match the input names that will be republished in your form.
Bob
Great, thank you. A couple of follow-up items.
Let's say that I want to pre-populate the form with the following data from the URL:
FirstName: John
LastName: Jones
I do not need this URL to pull any data from the DB. All I would like is for the URL to populate the form with these two fields so that the person can John Jones can then fill in the remaining information.
How would I need to structure the URL to do that? Do I need to modify anything else on the form side?
Thank you.
Let's say that I want to pre-populate the form with the following data from the URL:
FirstName: John
LastName: Jones
I do not need this URL to pull any data from the DB. All I would like is for the URL to populate the form with these two fields so that the person can John Jones can then fill in the remaining information.
How would I need to structure the URL to do that? Do I need to modify anything else on the form side?
Thank you.
This topic is locked and no more replies can be posted.