I have never had to work with too long <OPTION> values in drop-down lists and didn’t even imagine what problems they could cause.
I have a drop-down:
<?php echo $form->dropDownList($model,'economic_sector', CHtml::listData(AppSector::model()->findAll(), 'id', 'sectorTitle'),array('style'=>'width:440px;','empty' => '-- Please, indicate --')); ?>
And it has some terribly long values, like:
Manufacture of food products and beverages, including fruit and vegetable processing and including wine production based on local natural raw material
partially solves the problem, but:
It doesn’t work in webkit browsers like Chrome;
It just cuts the string by 440px and the remaining contents is not visible.
How would you struggle with this? As for as I understood, the ONLY way is to emulate dropDownList with jQuery, but it is the dark forest for me… Load, validate and save data lead me to an even greater horror.
Do you have any suggestions?