dropdown with conditions

hi forum,I have this situation

table A


id_A(PK)

field1

field2

date1

date2

state(FK)

Now , in the state there are 5 elements (it’s a dropdown )and what I want is that in the _form when date1 is inserted only in the dropdown show me a single element and when the field date2 is filled only show me the remaining 4 other excluding the previous case, any ideas?