• Hi,

    I am using the gravity pdf default template name called “example-backgrounds-and-borders02” to show the data based on fields data.
    Base on lead id, i am storing my few data calculation in custom table on form submit.

    Now in pdf i want to show those custom data.

    I am using the for loop to print the data but in my loop every-time it skips one value.

    Means for ex:- i am running loop for 0 to 10 than first i am getting 0 than directly 2 value and so on.

    It skips 1 – 1 value every-time.

    So can you please tell me how i can solve this issue.

    Its urgent for me so hope for the quick response.

    Thanks

    https://ww.wp.xz.cn/plugins/gravity-forms-pdf-extended/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Jake Jackson

    (@blue-liquid-designs)

    Hi,

    Try a foreach loop instead of a for loop. It will handle all array elements.

    Thread Starter manishsoni5041

    (@manishsoni5041)

    I have used both loop for and foreach.

    Than also its not working. It skip everytime.

    Plugin Author Jake Jackson

    (@blue-liquid-designs)

    You can try use var_dump($var); to see if the data you are after is actually in the array.

    If it isn’t then the problem is likely with your DB query.

    Thread Starter manishsoni5041

    (@manishsoni5041)

    I have checked, The data is coming, i am getting proper count of array also.

    Thread Starter manishsoni5041

    (@manishsoni5041)

    In loop after first data i am using pagebreak for the pdf second page and second data of array, i am showing on second page but its show direct third number data of array.

    Is there any issue with pagebreak tag?

    Plugin Author Jake Jackson

    (@blue-liquid-designs)

    Okay. When viewing your PDF via the admin area you can add &html=1 to the URL to check if your data is actually being output to the PDF renderer. If it is not in the HTML markup then I would look at debugging your PHP loop.

    Plugin Author Jake Jackson

    (@blue-liquid-designs)

    Now if the HTML is displaying when viewing the document with &html=1 appended the most likely problem is you are generating invalid HTML markup. Try run it through a HTML validator to help you resolve the problem.

    Thread Starter manishsoni5041

    (@manishsoni5041)

    i have checked my latest entry, it should get 3 data as per last entry but its getting two only.

    Actually as i have mentioned above, for gravity form fields, based on the fields i am doing some calculation and those calculations data i am storing on new table.

    So for ex:- as per lead id, i will get five calculation data than in table 5 data will get store with lead id.

    So in pdf based on the lead id, i am getting all this five data using custom query in array.

    I am getting data in array but in pdf as i told, its not coming properly.

    Please help me out with this.

    Plugin Author Jake Jackson

    (@blue-liquid-designs)

    I’ve provided as much assistance and insight into ways to help you debug your custom PDF template as our free support covers.

    If you would like us to get hands on and review and fix your template personally you can email us at support[at]gravitypdf[dot]com. Please note, there will be fees charged for this support.

    Thread Starter manishsoni5041

    (@manishsoni5041)

    ok thanks, i will take a look of this process.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘PDF LOOP Issue’ is closed to new replies.