Updated JS so that you can use multiple fields at the same time