开发者

Cakephp how to reduce number of rows displayed with the Multiple Select

开发者 https://www.devze.com 2023-01-17 17:38 出处:网络
I have a HABTM relation and when i use the following code. the Multiple Select is pretty long in size. i wanna know how to reduce the size.

I have a HABTM relation and when i use the following code. the Multiple Select is pretty long in size. i wanna know how to reduce the size.

<label for="checkbox">Cuisines:</label>
        <?开发者_如何学JAVAphp echo $this->Form->input('Cuisine', array('label' => false, 'div'=> false, 'class' => 'short')); ?>

Cakephp how to reduce number of rows displayed with the Multiple Select

I am not finding any option to reduce this size. should i do it with CSS only ?


You could use the "size" attribute.

<label for="checkbox">Cuisines:</label>
<?php echo $this->Form->input('Cuisine', array('label' => false, 'div'=> false, 'size' => 3)); ?>


select { height: 210px;} 

worked. Thanks a lot.

0

精彩评论

暂无评论...
验证码 换一张
取 消