Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
metadata:
title: Object radio buttons
short title: Object radio buttons
documentation: "https://docassemble.org/docs/fields.html#object_radio"
example start: 3
example end: 3
---
objects:
protagonist: Individual
antagonist: Individual
villain: Individual
---
code: |
protagonist.name.first = "Harry"
protagonist.name.last = "Potter"
antagonist.name.first = "Tom"
antagonist.name.last = "Riddle"
---
question: Who is the villain?
fields:
- The villain is: villain
datatype: object_radio
default: antagonist
none of the above: Someone else
choices:
- protagonist
- antagonist
- First name: villain.name.first
show if:
variable: villain
is: null
- Last name: villain.name.last
show if:
variable: villain
is: null
---
question: |
${ villain } will surely be defeated!
mandatory: True