Please, never send 12v. These are 0-5v inputs, 12v would damage it.
Use a 2k to 10k resistor (value doesn't matter a lot, anything in there can work great) between the input and 5v and you're making your own pull-up. That's the best way. No need to get as complicated as a relay.
With the resistor in there as the pull-up, it will be up around 4-5v on the input when floating. If you ground the input, it will go to 0v, so you can set up a trigger for that action.