1. Bogdan Savluk
  2. yii-tinymce
  3. Issues
Issue #1 wontfix

option "value" ignored

Jesús Jerez
created an issue

hi, I found a problem trying setting the option "value" in "TinyMce". TinyMce class extends the CInputWidget class, the problem is when evaluates "isset($this->model)" and omit if "value" option is set. I made a patch that is evaluated first "value" and then the "model"

Comments (2)

  1. Bogdan Savluk repo owner

    Thanks for report, but this is not bug - this is default behavior for CInputWidgets in Yii framework.

    For example you can see the same behavior in widgets: CAutoComplete, CMaskedTextField, CStarRating. In all of them if "model" property is set - "value" property will be ignored.

    This is because model should be the only place where we store our data(we should not store or change an information in view). So if we need to change value of input we should do this in model.

  2. Log in to comment