added ability to set a callback on form submission