I think this is such common requirement, but took me a long time to get working because the libraries were not always correct/compatible which was very confusing for me. I originally found some code which I adapted and added a simple spam test, but I wouldn't really use that technique on a popular site, it is too easily compromised.
I couldn't get the Bootstrap one working so I used the jQuery one. I made a slice with the code. Hope it works for you. http://www.web2pyslices.com/slice/show/1566/modal-enquiry-form --