Skip to content
Permalink
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (47 sloc) 1.01 KB
metadata:
title: Table export
short title: Export
documentation: "https://docassemble.org/docs/template.html#table"
example start: 1
example end: 4
---
objects:
- fruit: DAList
---
mandatory: true
code: |
fruit.object_type = Thing
---
mandatory: True
question: |
Information about fruit
subquestion: |
Here is a fruity summary.
${ fruit_table }
You can also [download this information].
[download this information]: ${ fruit_table.export('fruit.xlsx', title='fruit').url_for() }
---
table: fruit_table
rows: fruit
columns:
- Fruit Name: row_item.name
- Seeds: row_item.seeds
- Last eaten: row_item.last_eaten
---
code: |
fruit.there_are_any = True
---
question: |
What fruit should be added to the list?
fields:
- Fruit: fruit[i].name.text
- Number of seeds: fruit[i].seeds
datatype: integer
min: 0
- "When did you last eat one?": fruit[i].last_eaten
datatype: date
---
question: |
So far, the fruits include ${ fruit }.
Are there any others?
yesno: fruit.there_is_another
You can’t perform that action at this time.