Handling and populating forms with entities