when using CHTML:listView, an empty selection is not transmitted correctly #235

qiangxue opened this Issue Feb 15, 2012 · 0 comments


2 participants

qiangxue commented Feb 15, 2012

What steps will reproduce the problem?
create a form with a CHTML::listView().
Select multiple items in the listView
submit the form
when now inspecting $_POST[$form], the listView variable is a correct array of several items.

when selecting nothing, there is no POST value for the listbox - in contrast to e.g. CHTML::activeCheckBoxList(), which will return false if no selection was made, see here:

What is the expected output? What do you see instead?
I'd also like to see a "false" POST value, as $model->attributes = $_POST[$form] breaks, if no value is present (it will retain old values, thus making it impossible to delete something)

What version of the product are you using? On what operating system?
Yii 1.1.8 Mac OS 10.7

Please provide any additional information below.

Migrated from http://code.google.com/p/yii/issues/detail?id=2783

earlier comments

qiang.xue said, at 2011-08-30T15:28:39.000Z:

There's no CHtml::listView.

simonbrueckner said, at 2011-08-30T15:31:21.000Z:

Ah sorry, I meant: CHtml::listBox

qiang.xue said, at 2012-01-01T03:37:10.000Z:

set for 1.1.10 milestone

qiang.xue said, at 2012-01-01T03:37:36.000Z:

set for 1.1.10 milestone

mdomba closed this May 5, 2012

mdomba was assigned May 5, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment