Before dropdown functionality