Spinner no empty selection



From the picture above, is there a way if user click button Submit and the spinner selection is empty (meaning user did not make any selection) a notifier “Please don’t leave empty” will appear.

It seems like my if else condition doesn’t work and it will still store the value although user did not make any selection. Any solution for this?

the problem is, if you have added anything into spinner, automatically it will be set first element as selected element, so try like this

it works for me..

or else, set the first element as one empty space(recommended) and continue with your blocks too, it will work

1 Like

Thank you so much this works :grin: :grin: :grin:

1 Like

Glad to help you

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.