Added prepareFormData hook