in the yii framework
what is the difference between radioButtonList and activeRadioButtonList?
In Yii there is a "regular" and "active" version of (almost?) every CHtml form field helper/widget. With the "active" version you pass in the ActiveRecord Model and the Attribute you want to make a form field for. This ties the ActiveRecord model more closely to the form field which helps with a few things like:
Use activeRadioButtonList if you are building a form for an ActiveRecord model, and use radioButtonList if you are building a regular form (for a CFormModel model).
Read more about the both versions of the radioButtonList helper here:
radioButtonList not related to model activeRadioButtonList related to model
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With