How to load data from a table in several fields of a form, with the id

Load data from a database table into multiple form fields using an ID.

Overview

The user needs to populate form fields with data from a specific database record based on a primary key (ID).
Use the Read Data action in the form's Load section. Configure it to read from your table with a Where Statement to match the ID, then use Data Merge to populate fields where the field names match the table column names.

Answered
ChronoForms v8
da darkarturo 21 Jun, 2024

PLEASE NEED HELP... 

Please could you help me, what happens is that I have a form with 4 or 5 fields, of which the id is like the primary key, I would like to know if putting the id of a table that I have can load the other data in the column that I have Could you help me or make a tutorial please?

kg kgriffin 02 Aug, 2024
Answer
2 Likes

Hi-

Use a Read Data action in the Load section of the form page.

  1. Choose the table you want to read from the drop down.
  2. Under Behaviors add Where Statement.
  3. Click on the Where Statement toggle and add: id='some_value' 
  4. Under Behaviors choose Data Merge

Make sure the name of your fields matches the columns names of your table.

Hope that helps.

lo lollymaster 03 Aug, 2024

hi kgriffin,

if i need to do the same thing, but load the values after click from a link of a row (so with specific id) from a chronoconnectivity6 table?

Thanks,

Lorenzo

kg kgriffin 03 Aug, 2024

Sorry, lollymaster. I know nothing about chronoconnectivity6.

da darkarturo 23 Aug, 2024

I don't quite understand how to do it in Chronoform v7, could you help me or make a tutorial... please. I would appreciate it very much... please

This topic is locked and no more replies can be posted.