当前位置: 首页>>代码示例>>PHP>>正文


PHP Chtml::activeTextField方法代码示例

本文整理汇总了PHP中Chtml::activeTextField方法的典型用法代码示例。如果您正苦于以下问题:PHP Chtml::activeTextField方法的具体用法?PHP Chtml::activeTextField怎么用?PHP Chtml::activeTextField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Chtml的用法示例。


在下文中一共展示了Chtml::activeTextField方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: createMarkup

  /**
   * Creates markup required for the current mode.
   */
  public function createMarkup() {
    list($name,$id)=$this->resolveNameID();

    $this->htmlOptions["name"]= $name;
    $this->htmlOptions["id"]= $id;
     if(!$this->hasModel()) {
      $this->htmlOptions["value"]= $this->getValue();
    } else {
      $this->htmlOptions["value"]= $this->model->{$this->attribute} != "" ? $this->model->{$this->attribute} :
        $this->getValue();
    }
    $this->htmlOptions["style"]= "width:".($this->getWidth()-13)."px";
    $this->htmlOptions["class"]= "textfield";
    $this->htmlOptions["readonly"]= "true";
    $field = $this->hasModel()  ?
      Chtml::activeTextField($this->model,$this->attribute,$this->htmlOptions) :
      Chtml::TextField($this->name,$this->getValue(),$this->htmlOptions);
    ?>

<script>
  var <?php echo $id."_list"?> = new Array();
    <?php if (count($this->_list) > 0) { ?>
      <?php foreach ($this->_list as $i=>$v) { ?>
        <?php echo $id."_list"?>.push('<?php echo addslashes($v)?>');
        <?php }
    }?>
</script>
<div class='spinner' style="height:<?php echo $this->getHeight()?>px">
  <table cellspacing=0 cellpadding=0 align="left">
    <tr>
      <td rowspan='2'>
            <?php echo $field ?>
      </td>
      <td class="button_up" style="background-color:<?php echo $this->bgColor?>"
          onmousedown="javascript:setMouseDown('up','<?php echo $id?>','<?php echo $this->_type?>',
              <?php echo $id."_list"?>
                ,<?php echo "0"?>,<?php echo "0"?>,
              <?php echo "0"?>,<?php echo $this->getDelay()?>,
                '<?php echo $this->getAcceleration()?>');"
          onmouseup="setMouseUp();" onmouseout="setMouseUp();">
      </td>
    </tr>
    <tr>
      <td class="button_down" style="background-color:<?php echo $this->bgColor?>"
          onmousedown="javascript:setMouseDown('down','<?php echo $id?>','<?php echo $this->_type?>',
              <?php echo $id."_list"?>,
              <?php echo "0"?>,<?php echo "0"?>,
              <?php echo "0"?>,<?php echo $this->getDelay()?>,
                '<?php echo $this->getAcceleration()?>')"
          onmouseup="setMouseUp();" onmouseout="setMouseUp();">
      </td>
    </tr>


  </table>&nbsp;
  <span class="text"><?php echo  $this->text?></span>
</div>
    <?
  }
开发者ID:Henriquemvsantos,项目名称:GoNuts,代码行数:62,代码来源:STextSpinner.php

示例2:

echo Chtml::activeLabel($model, 'password');
echo Chtml::activePasswordField($model, 'password');
?>
</div>

<div class="row">
<?php 
echo Chtml::activeLabel($model, 'email');
echo Chtml::activeTextField($model, 'email');
?>
</div>

<div class="row">
<?php 
echo Chtml::activeLabel($model, 'telephone');
echo Chtml::activeTextField($model, 'telephone');
?>
</div>

<div class="row submit">
<?php 
echo CHtml::submitButton('register');
?>
</div>

<?php 
echo CHtml::endForm();
?>
</div><!-- form -->

</div>
开发者ID:bogdantarasenko,项目名称:myshop,代码行数:31,代码来源:reg.php

示例3:

<div class="form">

<?php 
echo CHtml::beginForm();
?>

<?php 
echo CHtml::errorSummary($model);
?>

<div class="row">
<?php 
echo Chtml::activeLabel($model, 'login');
echo Chtml::activeTextField($model, 'login');
?>
</div>

<div class="row">
<?php 
echo Chtml::activeLabel($model, 'password');
echo Chtml::activePasswordField($model, 'password');
?>
</div>

<div class="row submit">
<?php 
echo CHtml::submitButton('Войти');
?>
</div>

<?php 
开发者ID:bogdantarasenko,项目名称:myshop,代码行数:31,代码来源:auth.php

示例4:

	</div>
	
	<?php 
if (extension_loaded('gd')) {
    ?>
		<div class="row">
			<?php 
    echo Chtml::activeLabelEx($model, 'verifyCode');
    ?>
			<div>
				<?php 
    $this->widget('CCaptcha');
    ?>
<br>
				<?php 
    echo Chtml::activeTextField($model, 'verifyCode');
    ?>
			</div>
			<div class="hint">
				Ketik tulisan pada gambar,<br>Tulisan tidak case sensitive.
			</div>			
		</div>
	<?php 
}
?>
	
	<div class="row buttons">
		<?php 
echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save');
?>
	</div>
开发者ID:andhikayuana,项目名称:forum,代码行数:31,代码来源:_form.php


注:本文中的Chtml::activeTextField方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。