Fix foreign key display in edit forms

Add php tags to generate select tag for foreign keys in edit forms.