How to get two associated slot values?

environment

rasa-sdk == 2.8.5
rasa == 2.8.17

my question:

Now a form contains two slots, slot1 and slot2. If the value of slot1 is true, the robot asks the value of slot2 and obtains the value of slot2 from the dialog. If the value of slot1 is false, the robot does not need to ask the value of slot2. The dialog ends and the form is submitted.

What should I do about it?

thank you

You can use required_slots as described here

thank you ! the problem is soved according to your advice.