I’m thinking to reuse CActiveForm model for creating and editting record. The problem is, that on ‘edit’ scenario I do not need some form fields, which is needed on ‘create’ scenario. So I’m thinking to check scenario in view:
It should be fine to use conditions to show rows or not, but another approach that is easier to maintain and reusable is to use CForm. CForm renders safe attributes only (for the current scenario). So this would easily solve your issue. Here’s a link that shows you how to build a CForm: