Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
metadata:
title: Radio buttons from code
documentation: "https://docassemble.org/docs/fields.html#field with choices"
---
question: |
What type of shoes do you wear?
field: target_variable
choices:
code: |
[{'sneakers': "Sneakers",
'help': "Comfortable shoes.",
'css class': "sneakers",
'color': "secondary"},
{'sandals': "Sandals",
'help': "For summer.",
'css class': "sandals",
'color': "danger"},
{'clogs': "Clogs",
'help': "For hippies.",
'css class': "clogs",
'color': "warning"},
{'crocs': "Crocs",
'help': "For teenagers",
'show if': not is_adult,
'css class': "crocs",
'color': "warning"},
{'other': "Other",
'default': True,
'help': "Because the other types suck.",
'css class': "othershoe",
'color': "success"}]
---
question: Result of question
subquestion: |
target_variable is: "${ target_variable }"
mandatory: True
---
code: |
is_adult = True