3
工作,請參見下面的代碼:TBBUTTON復位不與redactorRow
<?php
$label = $model->isNewRecord ? 'Create' : 'Update';
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
'id' => 'article-form',
'type' => 'horizontal',
));
?>
<fieldset>
<legend><?php echo $label ?> Article</legend>
<?php
echo $form->textFieldRow($model, 'title', array('class' => 'span5', 'maxlength' => 200));
echo $form->redactorRow($model, 'content');
?>
</fieldset>
<div class="form-actions">
<?php $this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => $label)); ?>
<?php $this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'reset', 'label' => 'Reset')); ?>
<?php $this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'link', 'url' => url('article/index'), 'label' => 'Cancel')); ?>
</div>
<?php $this->endWidget(); ?>
首先我鍵入字段:標題(文本字段)和內容(主編) 其次,我單擊Reset按鈕 =>結果:只是標題字段爲空文本,不適用於內容。
請幫我這麼做!
感謝和問候,