limiting the code that is generated to only the db fields the user selects