Formonly fields are added by creating a non database field and making the record inactive. You must supply the business logic for the formonly field - it is not generated.