add generate-code to form