How to loop a form?

I wish to have a form in a way that at the start I want to ask the user how many users are there to book. And if the user says 4, I the form have to ask for the slot values 4 times (form runs completely for 4 times).

You can use required_slots in FormValidationAction to custom your slots, you can repeat 4 times of the slots as you want.


Can you elaborate a bit on that? where should I add it (PS: sorry, I’m new to RASA)

That’s ok. You can reference the doc here:

Create a custom action named ValidateXXForm, this action has a function named required_slots, this function will return a list of slots for which the form will fill. if you return [slot_a, slot_b, slot_c, slot_a, slot_b, slot_c, slot_a, slot_b, slot_c], the form will repeat slot_a, slot_b, slot_c for 3 times.

1 Like

Thanks a lot bro…will check out