I have had a thorough dig about and I can’t seem to find a way to do this…
It’s pretty simple - I have a system where an XML parser create AR classes based on parsed attributes and saves the class to the DB (providing it passes validation). So, I do not need to be able to create in the CRUD - it will be entered automatically.
Aside from the PK, there are 3 fields, two of which should not be edited manually, and a third that does require editting, and will be populated from CActiveForm::dropDownList. So, in essence, I will not have any of the fields accepting free-hand input.
The dropDownList is easy enough and is already in place (it is fed from an DB reference table). However, I want to know if there is any way to display the other 2 fields as just uneditable text i.e. like a label simply stating the DB value.
Agree with reply posted by seenivasan.but will add one more solution for it.Make a field as a hidden field on the form.In this way you dont want to write any code inside a controller.