How to display Buttons on a Raw Input Capture?
# šŸ¤help
r
I want to add a couple of optional ā€œchoiceā€ buttons to a Raw Input card that a user ā€œmightā€ click on or they might type an answer. I can’t work out how to do it though. Does this need to be a feature request - or is there a way to do it that I haven’t thought of. As an example for the use case, let’s say I have a long list of questions to ask the user, but after I ask each question, I want to give the user a chance to revisit the previous question or go back to the beginning - so I’d like to display a button that says ā€œBackā€ and another that says ā€œStart Overā€ after each question - and allow them to click one of the buttons OR to go ahead and type in an answer to the question (which I would store as Raw Input).
h
I would add Raw Input and underneath it Single Choice. The crucial element in this node that is responsible for the logic is expression (if rawinput is not empty or choiceVariable is not empty) or you can do without choice by using intent where you specify potential phrases that the user can set.
a
@rapid-manchester-41665 the default single choice has two "advanced" options- "retries" and "add failure transition" If you set the number of retries to zero, then whenever a user fails to click a button that "failure" transition will be triggered.
r
Thanks @happy-arm-71853 . I’m trying to understand what you mean. Here’s a better example of my use case. I want to ask the users questions about a landscaping job to provide an estimate. One of the questions is ā€œDescribe any obstacles we would need to avoid.ā€ I would have a variable named obstacles - but i would want to display a quick answer button that says ā€œNo obstaclesā€ underneath the question. If they click the button, I want to set obstacles = ā€œNo obstaclesā€ and if they type in something like ā€œThere is a swing-set and a sandboxā€ I would want to set that string as the value for obstacles. In either case though, I want to move on to the next question. @User Sorry, I’m not sure how your suggestion would solve my problem…
šŸ¤” @happy-arm-71853 I got it working using mostly what you said. It seems like you can add a ā€œChoiceā€ under advanced options to the Raw Input capture. I’m not sure if that’s all it takes or not because I had already set retries to 0 because of the advice from @acceptable-kangaroo-64719. And it now works the way I want so I don’t want to change it and risk breaking it! Thanks again guys…
19 Views