Expand my Community achievements bar.

Only able to choose from one drop-down

Avatar

Level 3

I have two drop-down lists. One includes a list of particular locations within an organisation, the other includes a list of other different type of locations. What I want is if the user chooses from the first dropdown they can't choose from the second list. I also want them to be able to delete their first choice if they change their mind and be able to choose from the second list ... and vice-versa if you know what I mean.

Is this possible?

Thanks for your help.

1 Reply

Avatar

Level 7

That sounds like a two-part problem.

First, you'll need to check the drop down field on exit. If the field isn't empty, then you want to make the access for the other field readOnly, and I would recommend going ahead and setting the value to "", just to be sure. You're going to want the user to be able to clear the field, too, so you can either enable editing or create a button to clear the selections.

The second part depends on the first. The button to clear is easiest. You set both values to "", and make the access open for both. If you choose to use the option to allow the user custom entry, they can delete the fields value on their own, but you'll need to validate the fields' values to make sure they are from the list.