After filling a form, to fill another new form it takes pre-fllled required slots and finishes the form, why is that? it says **Validating pre-filled required slots**

after filling a form, to fill another new form it takes pre-fllled required slots and finishes the form, why is that?? i want to override with new slot values

You have to manually set the slot values to None in the first form submit method, like below. return [SlotSet(“credit_card”, None)]

but i have quite at least 7 to 8 slots being filled…so how do i erase that all after i have done with what ever i need them for so that the bot can ask me for the required slot again

You would need to use a custom action and return a list of SlotSet events as described in the previous post. Then if you call that custom action before your second form, it will reset those slot values to None, prompting the user to fill them again.

@alexyuwen…okay thanks

Here’s something else to try

I think the auto_fill property for your slots needs to be set to false, that’ll keep them from getting set other places in your bot.

You can reset your slots in your story with action_slot_reset … I think that is out of the box. But if not, you can add this to your actions.py file -

class ActionSlotReset(Action):
    def name(self):
        return 'action_slot_reset'
    def run(self, dispatcher, tracker, domain):
        return[AllSlotsReset()]

and then add action_slot_reset to actions: in your domain.yml file

This will reset ALL of your slots, not just a few. If you only want a few cleared, I supposed you could write a function that would take a list of slots and clear them out like @alexyuwen mentioned.

@jonathanpwheat…thanks