I am developing a form but i have a slight problem. Depending on what input the user has registered in two “valid” slots i want to add a slot to the form otherwise i will not. The problem is that the required_slots function seems to run before validate_{slot} which gives me some trouble. I hope the description is clear, how can i solve this?
The validate calls are actually made by required_slots
. Within required_slots
you can test existing slot values and set the required slots based on that:
if tracker.get_slot('ball_searching') == 'not_searching':
# general_area, not_searching
return ["ball_location", "ball_searching", "who_moved", "reason_moved"]
else tracker.get_slot('ball_searching') == 'searching':
# general_area, searching
return ["ball_location", "ball_searching", "who_moved"]