Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Cactiveform - Can You Disallow Edits Of Certain Ar Fields?

$
0
0
Hi folks,

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.

Is there any way to do this?

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>