Hook the form and API