Rasa Form Back Navigation

Hello,

Could anyone tell me how I might integrate back navigation within the Forms in case the user changes their mind? My form consists of both button and normal text entry and was planning on implementing the back navigation at every step. And if they choose to go back at the beginning step, they would just exit the form.

Things I tried:

  • Using action_back: This even though was able to successfully go back one step, the form does not re ask the previous question. Which does not work well in case the previous question involved buttons.
  • Using action_back with custom action and tracker. When I tried this, I used the tracker to fetch the last question including the buttons by using an offset of -13. This worked well but causes a problem when the user uses go back multiple times consecutively, as the offset no longer works.

I thought about a solution again checking the tracker to see whether the last action was go back and repeating it until a “non-go_back” action was found. But I though at this point I am making things more complicated than it should be.

So is there any simpler or more efficient solution to do what I am trying to achieve? Thank you.

HI @ismaeelBM

I’m also facing a similar problem, and haven’t been able to get to a successful ending. I’d really appreciate if you could share a sample code that presents the working of a “Back” button using action_back.

Thanks

Hi rahul,

Sorry but I ended up scrapping my code because i realized that logic would no longer work if the user no longer follows a straightforward path (for example, they type an invalid input, they ask for an explanation of an input, etc.). So instead I got rid of the whole form input and decided to use webview to connect to our website in facebook and do all the entry from there.

Also one thing I realized was that if you call the action_back Action, you are unable run any other utter messages for some reason. For example if you write in your story

* go back
- action_back
- say_something

the say something intent would no longer work for some reason.

Oh I see, thanks for the information ismaeel !