diff --git a/include/class.forms.php b/include/class.forms.php index 46d55c2d95d17cbaccb457f60d99d623ecc95133..69880bebf82f666b360c7277fbac6384f950fdd3 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -3175,7 +3175,11 @@ class PhoneNumberWidget extends Widget { class ChoicesWidget extends Widget { function render($options=array()) { - $mode = isset($options['mode']) ? $options['mode'] : null; + $mode = null; + if (isset($options['mode'])) + $mode = $options['mode']; + elseif (isset($this->field->options['render_mode'])) + $mode = $this->field->options['render_mode']; if ($mode == 'view') { if (!($val = (string) $this->field)) diff --git a/include/class.list.php b/include/class.list.php index ad9b73bcea67de20311ec5b34a1531cb20f1f432..0c4a7cb1998757c7eff73c9de2361b0daa18b85d 100644 --- a/include/class.list.php +++ b/include/class.list.php @@ -1352,6 +1352,7 @@ implements CustomListItem, TemplateVariable { if ($this->isInternal() && ($f=$this->_form->getField('state'))) { $f->ht['required'] = $f->ht['editable'] = false; + $f->options['render_mode'] = 'view'; } }