use previously written ajax form submit in js/views.js