I would like to do a database read which returns 1 row.
I would then like the fields to automatically appear in a form on the page.
I know I can do this manually by setting the value of each field in the form with the {var:Payments.PaymentId} tag (Payments is the model name and PaymentId is a column name).
But is there a way to do this automatically? The read data action has a 'Populate Fields' behavior. What does it do? How do I use it?
Thank you.
If you managed to do that to recover the data in a form, could you make a tutorial or something please?
I'd prefer not to make a video of myself doing it, that would be too much effort.
But I can explain what I did.
In the Actions section of Chronoforms 7, you use a read data to retrieve one row from a database table. In the Behaviors section of the read data I set the it to populate fields and set models data.Then in the Views section I made a form and made the forms inputs have names that come from the database table. For example if I have a Person table with columns for Age, Height, and Weight, I would make the field name of the HTML form inputs (within chronoforms) Person.Age, Person.Height, Person.Height.
Is there anything else that I can explain?
in v8 you just need to have a "Read data" with Merge Data behavior enabled and your form fields names should match the table columns names