Buy Now
Sign in

refill a form from database

koko321 , March 16 at 23:41
K
koko321
good day,​
​​
​I have some data in a database.​
​I want to load this data into a form created for it.​
​But I do not get the data neatly in the form.​
​​
​What I've done:​
​- and read data event in the load, reads the data from the data base. this is called read_data8.​
​That gives an array read_data8. Model Member​
​[var] [n] [member] the data.​
​This is all going well.​
Screen_Shot_2018-03-17_at_00.27.42.png
​But now I want to show them data in a form.​
​A Multi field area contains all necessary fields. But I can not see any data here.​
​Via event_loop6​
​So value of the text field should be something of ....​
​var: eventloop6.fieldname​
​But unfortunately this does not work.​
​I will do something wrong. But I do not see what.​
​​
​Who can help me?
admin
Hi koko321,
You are trying to load 1 record on the form or multiple records ? if its 1 record then you need to set the "Read data" Select type to "First matching" then use {var:read_data8.lid} in the "Data provider" setting under the "Display section" action settings, the "Read data" should be above the "Display section".
Best regards,
Max
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
K
koko321
Hi admin,​
​​
​Thanks for the quick response.​
​I was trying with the Data provider of the field itself.​
​But I have to have the Data provider of Display section.​
​Thank you for the assistance. it works well for a record.​
​​
​The next challenge, for multi records ...​
​When I run the Display section in a loop.​
​And I give the Data provider of the loop {var: read_data8}​
​Then I would think that the Data provider of Display section needs an index.​
​But how do I do this?​
​Hopefully my way of thinking is good ...​
​​
​Who can help me with this?​
​Thanks for the help.
admin
Hi koko321,
Yes, the Data provider for the display section would be like this:
{var:loop_name.row}
Best regards
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!