How do I create a contact form that allow me to block spams by collecting their IP address?

I am dealing with the same issue- is there any update on how to fix this kind of thing?