Codeigniter 3 文本区域
Codeigniter 3 textarea
我试图将 textarea 中的行数限制为 4,但出现错误
Message: Array to string conversion
这是我使用 helper 的 textarea 代码 class
$textarea_options = array('class' => 'form-control','rows' => 4, 'cols' => 40);
echo form_textarea('vc_desc', set_value('vc_desc'), $textarea_options);
使用所有选项设置 $data 数组
$data = array(
'name' => 'vc_desc',
'id' => 'vc_desc',
'value' => set_value('vc_desc'),
'rows' => '50',
'cols' => '10',
'style' => 'width:50%',
'class' => 'form-control'
);
echo form_textarea($data);
Use rows and cols to get change the height and length of text area in code ignitor.
$data = array('name' => 'SupAddress','value' =>set_value('SupAddress'), 'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true' ,'rows' => '3', 'cols' => '40');
echo Form_textarea($data);
我试图将 textarea 中的行数限制为 4,但出现错误
Message: Array to string conversion
这是我使用 helper 的 textarea 代码 class
$textarea_options = array('class' => 'form-control','rows' => 4, 'cols' => 40);
echo form_textarea('vc_desc', set_value('vc_desc'), $textarea_options);
使用所有选项设置 $data 数组
$data = array(
'name' => 'vc_desc',
'id' => 'vc_desc',
'value' => set_value('vc_desc'),
'rows' => '50',
'cols' => '10',
'style' => 'width:50%',
'class' => 'form-control'
);
echo form_textarea($data);
Use rows and cols to get change the height and length of text area in code ignitor.
$data = array('name' => 'SupAddress','value' =>set_value('SupAddress'), 'id'=>'SupAddress', 'class' => 'form-control' ,'readonly' => 'true' ,'rows' => '3', 'cols' => '40');
echo Form_textarea($data);