本文整理汇总了PHP中FormHelper::textarea方法的典型用法代码示例。如果您正苦于以下问题:PHP FormHelper::textarea方法的具体用法?PHP FormHelper::textarea怎么用?PHP FormHelper::textarea使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormHelper
的用法示例。
在下文中一共展示了FormHelper::textarea方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: textarea
public function textarea($fieldName, $options, $before = false)
{
if ($before) {
if ('textarea' === $options['type']) {
$options += array('cols' => false, 'rows' => '3');
}
return $options;
} else {
return parent::textarea($fieldName, $options);
}
}
示例2: render
public function render()
{
$sResult = FormHelper::textarea($this->getAlias(), $this->getValue(), array('class' => 'redactor_content', 'id' => 'field_' . $this->getAlias()));
$sResult .= '<script>$(document).ready(
function()
{
$( \'#field_' . $this->getAlias() . '\' ).ckeditor();
}
);</script>';
echo $sResult;
}
示例3: textarea
/**
* FCK editor instance maken van textfield
*
* @param string $fieldName
* @param array $options
* @return string
*/
function textarea($fieldName, $options = array())
{
$code = parent::textarea($fieldName, $options);
$options = $this->_initInputField($fieldName, $options);
$did = $options['id'];
$js = $this->webroot . 'js/fck/';
$code .= '<script type="text/javascript">' . "\n";
$code .= "fckLoader_{$did} = function () {\n";
$code .= "var bFCKeditor_{$did} = new FCKeditor('{$did}');\n";
$code .= "bFCKeditor_{$did}.BasePath = '{$js}';\n";
$code .= "bFCKeditor_{$did}.ToolbarSet = 'Default';\n";
$code .= "bFCKeditor_{$did}.ReplaceTextarea();\n";
$code .= "}\n";
$code .= "fckLoader_{$did}();\n";
$code .= "</script>";
return $code;
}
示例4: textarea
public function textarea($fieldName, $options = array())
{
$optionsDefault = array('class' => 'form-control');
$options = array_merge_recursive($optionsDefault, $options);
return parent::textarea($fieldName, $options);
}
示例5: testTextarea
public function testTextarea()
{
$this->assertEqual(FormHelper::textarea('name', 'value', array('class' => 'myClass')), '<textarea name="name" class="myClass" id="name">value</textarea>');
$this->assertEqual(FormHelper::textarea('name', $this->Model, array('class' => 'myClass')), '<textarea name="name" class="myClass" id="name">obj</textarea>');
}
示例6: testTextarea
public function testTextarea()
{
$html = $this->object->textarea('element', 'inner text', array('arbitrary' => 'arbitrary', 'class' => 'test-class'));
$this->assertAttributes($html, array('class' => array('test-class', 'ccm-input-textarea'), 'arbitrary' => 'arbitrary'));
}
示例7: array
<div class="row">
<div class="col-md-6">
<?php
FormHelper::input('valor', 'Valor', $r['valor'], array());
?>
</div>
<div class="col-md-6">
<?php
FormHelper::input('custo', 'Custo', $r['custo'], array());
?>
</div>
</div>
<input type='hidden' value='0' id="finalizar" name='finalizar'/>
<?php
if ($ident && $r['finalizado'] == "0" || !$ident) {
FormHelper::textarea('observacao', 'Observação', '', array());
}
$obs = array();
if ($ident) {
$obs = "select \n observacao,\n datetime,\n (select name from user where o.user_id = id) as usuario\n from suporte_observacao o where suporte_id = " . $ident . " order by datetime desc";
$obs = $db->query($obs);
}
FormHelper::submitAjax('Salvar', 'salvar', array('class' => 'button', 'style' => 'margin:5px'));
if ($ident && $r['finalizado'] == "0") {
?>
<button
type="button"
class ='button'
style='margin:5px 15px 5px 5px;float:right'
onclick="finalizaSuporte_Sender(event,1)">Finalizar</button>
<?php
示例8: array
<?php
FormHelper::input('cidade', "Cidade", $cidade, array('placeholder' => 'Digite a cidade'));
?>
</div>
<div class="col-md-5">
<?php
FormHelper::input('estado', "Estado", $cidade, array('placeholder' => 'UF'));
?>
</div>
</div>
<div class="row">
<div class="col-md-12">
<?php
FormHelper::textarea('complemento', "Complemento");
?>
</div>
<?php
FormHelper::textarea('referencia', "Referência / observação");
?>
</div><?php
FormHelper::end(false);
?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
<button type="button" class="btn btn-primary" onclick="App.Endereco.Salvar()">Salvar</button>
</div>
<script type="text/javascript">
$("#formEndereco")[0].reset();
</script>
示例9: textarea
/**
* Creates a textarea widget.
*
* ### Options:
*
* - `escape` - Whether or not the contents of the textarea should be escaped. Defaults to true.
*
* @param string $fieldName Name of a field, in the form "Modelname.fieldname"
* @param array $options Array of HTML attributes, and special options above.
* @return string A generated HTML text input element
* @access public
* @link http://book.cakephp.org/view/1433/textarea
*/
public function textarea($fieldName, $options = array())
{
$options = $this->_addPlaceholder($fieldName, $options);
return parent::textarea($fieldName, $options);
}
示例10: textarea
public function textarea($fieldName, $options = array(), $tinyoptions = array()) {
$this->_build($fieldName, $tinyoptions);
return parent::textarea($fieldName, $options);
}
示例11: render
public function render()
{
echo FormHelper::textarea($this->getAlias(), $this->getValue(), \ArrayHelper::merge(array('class' => 'TextboxField', 'id' => 'field_' . $this->getAlias()), $this->getHtmlOptions()));
}
示例12: textarea
/**
* Creates a textarea widget.
*
* ### Options:
*
* - `escape` - Whether or not the contents of the textarea should be escaped. Defaults to true.
*
* @param string $fieldName Name of a field, in the form "Modelname.fieldname"
* @param array $options Array of HTML attributes, and special options above.
* @return string A generated HTML text input element
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper::textarea
*/
public function textarea($fieldName, $options = array())
{
$options['normalize'] = false;
return parent::textarea($fieldName, $options);
}