https://discord.gg/botpress logo
Is there a way to block user input with single cho...
# 🤝help
f
I'm using botpress to build chatbot courses and there are several instances where I use a single choice card with a button saying "ready" or "let's go!" as a sort of line-break, so the user does not get a huge wall of text. In those instances, I do not want an AN to answer to whatever the user is saying/asking. ANs are still notoriously sticky and I can't risk the conversation path getting stuck. So to circumvent this, I'd like to block off any free input in those particular spots. I saw some tutorials on this from 2 years ago using entities from the library, but that is obviously outdated and likely wouldn't even work anymore in the first place. Anyone know how to make this happen? I've checked with Claude, it only suggests the workarounds I've already tried (creating a fallback AN that informs the user this is not the time to ask questions, and then triggers a transition).
w
i don't know about "blocking off" input, but couldn't you just retry the question?
in the "single choice" inspector, scroll down to "advanced configuration" and add "retries"
f
I appreciate the thought, but why would I want them to retry? The whole point is that I don't want them to give any input. Or am I misunderstanding you here?
w
i'm thinking about this specific solution because even if you manage to block off the input here, there might be a time where you're integrating with a platform that doesn't allow that
like whatsapp or facebook or something
f
We are building these chatbots for our own platform, so that will fortunately not be necessary. Still, good looking out
w
oh nice, no problem then. i really don't know how to block out the input, so two suggestions are 1. the retry 2. use a transition to ignore the input if it's not the button, and loop back to the listen block
f
the 2. option is my workaround for now. I attached an AN to this that will either tell the user that this is not the time for questions if they actually asked a question and if there was no question, it simply transitions them on. That sort of works, but it can still create dissonance in the user, since they understandably expect an answer when they write or ask something. So that's why I'd say it's better if they don't even have that option at that point
w
just hide the whole input field LOL
went through the whole server history and seems like that's the only solution found, and may not work anymore due to the stylesheet changes unfortunately
though if you're building a custom interface using their react library, i'm fairly confident you can just hide it easily
f
yeah, we are not at that point yet unfortunately 😅 We are currently essentially just integrating their webchat into what amounts to a content management system right now
I've had a look at that one too, that's the one I referred to in my original message as outdated. But I'll look through it regarding the hiding of the whole input field part
2 Views