I am pretty sure this will be simple and probably staring me in the face but I just haven’t been able to work it out.
I have a column in a table that is a FK to another table but also allows NULL. I want to create a dropdownlist that will allow me to select the FK but also allow me to set it back to NULL if need be.
Currently, I have this…
array( 'class' => 'yiiwheels.widgets.editable.WhEditableColumn', 'name' => 'tournament_fk', 'editable' => array( 'type' => 'select2', 'url' => $this->createUrl('TournamentFeeds/update'), 'source' => Tournament::fkArray(), ) ),
Can anyone give me advice on how I could modify this to allow to enter NULL? Tournament::fkArray() simply uses CHtml::listData to return a valid list.
Thanks in advance,