docMaker User guide
  • πŸ‘‹Welcome to docMaker
  • Features
    • Create pdf from docx template
      • πŸ—οΈBuild your docx template
        • Overview
        • Text substitution
        • Images
        • Conditions
        • Loops
          • Simple list
          • List with multiple values
          • Adding rows into a table
          • Loops in columns + lines (grids)
          • Nested loops
        • QR codes
        • Rich text & html
      • βš™οΈdocx_fill_convert API parameters
    • Fill-out pdf forms
      • πŸ”§Build your pdf form
      • βš™οΈpdf_fill API parameters
    • Print web page to pdf
      • βš™οΈpage_pdf API parameters
  • INTEGRATIONS
    • Typeform
      • Create pdf or docx for each Typeform response
    • Bubble.io
      • πŸ“Easy pdf from docx template
      • πŸ“‹Fill-out pdf forms
      • πŸ–₯️Webpage to pdf
    • Make.com
    • Coda
    • Xano
    • Zapier
    • API
  • FAQ
    • 🫧Bubble.io questions
    • πŸ“„Questions on docx templates
    • πŸ“™Questions on pdf templates
Powered by GitBook
On this page
  1. Features
  2. Create pdf from docx template
  3. Build your docx template
  4. Loops

Nested loops

PreviousLoops in columns + lines (grids)NextQR codes

Last updated 1 year ago

docMaker lets you create nested loops, without any limit in terms of depth of the loops.

The nested loops feature is very useful when you need to group your output by categories. They can be used inside tables or also for plain text, in order to repeat multiples lines inside main paragraphs.

Below is an example of this feature in a template.

The Bubble demo can be found here : |

In order to do that, you will have to create a nested loops JSON and nested loops in your template.

{β€œorders” : [
 {
   "name": "Order1",
   "orderLines": [
     {
       "item_name": "trousers",
       "item_quantity": 1,
       "item_price": 100,
     },
     {
       "item_name": "shirt",
       "item_quantity": 50,
       "item_price": 50,
     },
     {
       "item_name": "shoes",
       "item_quantity": 1,
       "item_price": 1,
     },
   ]
 },
 {
   "name": "Order2",
   "orderLines": [
     {
       "item_name": "socks",
       "item_quantity": 1,
       "item_price": 33,
     }
   ]
 }
]
}

Copy

Template

Result

πŸ—οΈ
demo
editor
➑️