TCPDF : How to display a field with foreach?

More
2 years 1 month ago - 2 years 1 month ago #82935 by ekwax
Hello !
I am using this tutorial  here to use TCPDF library  to make a pdf donwload page with some fields 
I went to TCPDF website site for some code.

I would like to display each name value of my field on its own page
//allow to load a flexicontent field
$myfield_html = FlexicontentFields::getFieldDisplay($item, 'field_resume');

// Start First Page Group (from TCPDF site)
$pdf->startPageGroup();

// add a page
$pdf->AddPage();
foreach($myfield_html as $student){
$name= $item->fields->display;
}
$pdf->Cell(190,5,"$name",1,1);

I am getting all names on same page
where am i wrong?
Last edit: 2 years 1 month ago by ekwax.

Please Log in or Create an account to join the conversation.

More
2 years 1 month ago #82938 by micker
you need to check return of $student
foreach($myfield_html as $student){
$name= $student->something;
}

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.793 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline