Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add field: Checkboxes/other things created with code with complex objects? #797

Open
plocket opened this issue Jun 26, 2021 · 0 comments
Open
Labels
fromkilnsetup Transfered from the docassemble-ALKilnSetup repo testing Tests for this framework

Comments

@plocket
Copy link
Collaborator

plocket commented Jun 26, 2021

Something like the below? Needs AssemblyLine package. Creates double encoding.

---
sets:
  - trial_court
id: choose a court from list
question: |
  What court is your case in?
subquestion: |
  Look at your Abuse Prevention Order. 
  
  Underneath **your** name, see the court name. 
  
  Select that court from the list below:
fields:
  #- no label: trial_court
  #  datatype: object
  #  object labeler: |
  #    lambda y: y.short_label()
  #  choices: all_courts.filter_courts(allowed_courts)
  - no label: trial_court
    datatype: checkboxes
    code: |
      court_choices.filter_courts(allowed_courts)
---
code: |
  for court in all_courts:
    court.label = court.short_label()
  court_choices = all_courts
---
@plocket plocket changed the title Add page: Checkboxes/other things created with code with complex objects? Add field: Checkboxes/other things created with code with complex objects? Jun 27, 2021
@BryceStevenWilley BryceStevenWilley transferred this issue from SuffolkLITLab/docassemble-ALKilnSetup Oct 18, 2023
@BryceStevenWilley BryceStevenWilley added testing Tests for this framework fromkilnsetup Transfered from the docassemble-ALKilnSetup repo labels Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fromkilnsetup Transfered from the docassemble-ALKilnSetup repo testing Tests for this framework
Projects
None yet
Development

No branches or pull requests

2 participants