I’m working on updating my Goodnight Ubi app to add some optional functionality. Specifically I want to allow the app to optionally turn on some lights. Then, the user can also select to have this turned off later, and finally specify a period of minutes later for when they turn off.
The inputs are easy enough:
Which lights?
Turn 'em off later?
How much later?
But here’s the thing: The lights are of course optional. If the user doesn’t want to turn any on s/he doesn’t add an here. But what I want is for the second question: “Should I turn them off later?” to be required if lights are selected, but otherwise optional.
Furthermore, the third question: “How many minutes later?” should also be optional, unless the user said yes to turning them off later, then it should be required.
Is something like this possible?