Forums

Populate TCPDF with fields read from the Database

spytech 25 May, 2020
Hi,

I have a form that I read data from the DB and display to the user, they do not enter it. I am trying to embed these field in to the PDF on submit but it does not work.
I have tried:
{data:my_field_name}
{var:read_data3.Contract.my_field_name} - This works only to display the DB data on the loaded form.

Neither work, can you let me know how I can embedd fields in my PDF that are pulled from the DB.

Thanks.
healyhatman 26 May, 2020
The second one, the {var:}. Works for me, maybe screenshot how you're using it
spytech 26 May, 2020
Hi, please see attached below of PDF tool and layout of the order:


healyhatman 26 May, 2020
The read_data3 action is in your load event, not your submit event. You need to read the data again.
spytech 30 May, 2020
Hi, so I have added the read data in my submit even. I tried the TCPDF in both the 'Found' section of the read data and outside that section but still does not work. I used this format - {var:read_data28.PDFRead.property_number}
It still does not feed the the PDF with the data, any ideas, see below screen shots:


healyhatman 30 May, 2020
You have it set to all matching I assume you want first found
spytech 31 May, 2020
Ah! So simple... Thanks that now works, cheers for your help, appreciate it.
alexarroyo 28 Feb, 2021
I have a similar problem, I read the database from and compare it with the dropdown value, it shows me the values on the screen and then I want to generate the pdf of the values that I have on the screen.

I read the data on the dropdown page, I reread the data comparing it to the dropdown on page 2 and I reread the data with the same comparison on page 3 which is where I generate the PDF.The dropdown value works perfectly, but the values of the database table impossible.

I try with "first record" and with "all machinig records" and nothingI have set the values of the three times I read the database and nothing.I work with joomla 3.9.24 and chornoforms7.Sorry for the google translation🙂

Thanks






healyhatman 28 Feb, 2021
All Matching is when you want to retrieve several rows to display. If you only want one row, you want First Matching
This topic is locked and no more replies can be posted.