October 15, 2014 at 11:19 /
I hope you dont but that code in the form itself. Use a javascript file instead and load it at the appropriate place.
Further $ isn’t set in wordpress so replace it with jQuery.
Regards