jhpyle / docassemble

A free, open-source expert system for guided interviews and document assembly, based on Python, YAML, and Markdown.
https://docassemble.org
MIT License
786 stars 255 forks source link

Documentation: Is there a way to mix-mash buttons #15

Closed jrmiller82 closed 7 years ago

jrmiller82 commented 7 years ago

In playing around, I can't seem to get buttons that mix with exit, restart etc., with buttons that set a field.

For example:

---
button:
  - Exit: exit
  - Restart: restart
---

Works just fine. But if you try and mix it with a field, the exit and restart no longer works because it's been assigned to the field. For example:

field: bvar
button:
  - Exit: exit
  - Restart: restart
  - More: True
---

No longer gives you the exit and restart functionality. Is there a way to mix these?

If I do:

---
buttons
  - Exit: exit
  - Restart: restart
  - Continue: continue
---

I get a blank screen with just a second continue button and that doesn't look very professionl and is what I'm trying to avoid with the Continue button.

jhpyle commented 7 years ago

I should have said in the documentation that if you add field to a question with "special" buttons (exit, restart, etc.), then docassemble will treat it as a regular multiple choice question.

I added a documentation section that explains how to mix buttons that exit the interview with buttons that set a variable.

jrmiller82 commented 7 years ago

Awesome. Thank you. The use buttons to run code is perfect.

Sent from my iPhone

On Feb 4, 2017, at 09:01, Jonathan Pyle notifications@github.com wrote:

I should have said in the documentation that if you add field to a question with "special" buttons (exit, restart, etc.), then docassemble will treat it as a regular multiple choice question.

I added a documentation section that explains how to mix buttons that exit the interview with buttons that set a variable.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.