Hi all, hope you’re having a lovely day.
I am facing a slightly intricate problem, but I will explain it as simple as possible:
I have a FormAction used for authentication and takes in multiple credentials from the user.
credential1 and credential2 are mandatory, but then the user has the option to choose credential3 or credential4 as their final credential to authenticate.
These are the credentials the bot should ask for: consumer id (cid) -> this is credential1 pin code -> credential2 ssn code -> credential3 phone number -> credential4
So, cid and pin are mandatory, but only one of ssn and phone number is needed.
Whether the bot asks for the ssn code or the phone number is based on user input after entering the consumer id and pin code.
How do I model this in a form action?
Basically the trouble I’ve been having is changing the list returned by the required_slots() method, based on the user input to choose the ssn code or phone number, half way through the form action.
Alternatively, if there’s a much better and cleaner approach, please let me know.
Many thanks in advance, and happy coding!