0
我有我的電話/ index.ctp下面的代碼。當我點擊註釋字段時,光標從字段中間開始,而不是從開始處開始,而且鍵入的內容超出了字段寬度,並且一旦到達字段寬度,它就不會進入下一行。有人可以幫忙嗎?我希望光標從輸入字段的最開始處開始,如果它達到字段集的寬度,它應該自動進入下一行。蛋糕PHP和輸入框的樣式
來電/ index.ctp:
<div class="divm centerdiv">
<?php echo $this->Form->create('Call'); ?>
<fieldset>
<legend><?php echo __('Add Call Details'); ?></legend>
<?php
echo $this->Form->input('call_date',array('required'=>false,'id'=>'datepicker','type'=>'text'));
echo $this->Form->input('call_time', array('required'=>false));
echo $this->Form->input('comments', array('style'=>'width:365px; height:100px;','required'=>false, 'id'=> 'comments'));
echo $this->Form->input('next_call_date',array('required'=>false,'id'=>'datepicker2','type'=>'text')); echo $this->Form->input('customers_id', array('label' =>'Customer Name','options'=>$customers, 'label'=>'Customer Name', 'required'=>false));
echo $this->Form->input('employees_id', array('label' =>'Employee name','options'=>$employees, 'label'=>'Employee name', 'required'=>false));
?>
</fieldset>
<?php echo $this->Form->end(__('Submit')); ?>
</div>
這與其說是一個CakePHP的問題,你所描述的客戶端自定義表單行爲。這需要一個基於JavaScript的解決方案。 – Oldskool
'當我點擊評論字段時,光標從字段中間開始'聽起來像你有一個CSS問題。其中涉及到的渲染結果的任何問題都需要一個客戶端(HTML,CSS,JS)修復第一,其中*可能*意味着你改變你的PHP代碼 - 但總體來講,你如何生成html的相關性不大HTML/CSS問題。 – AD7six