textArea() public static method

Generates a text area input.
public static textArea ( string $name, string $value = '', array $htmlOptions = [] ) : string
$name string the input name.
$value string the input value.
$htmlOptions array additional HTML attributes.
return string the generated text area.
Exemplo n.º 1
0
 public function testTextArea()
 {
     $I = $this->codeGuy;
     $html = TbHtml::textArea('textarea', 'Textarea text', array('class' => 'textarea'));
     $textarea = $I->createNode($html, 'textarea');
     $I->seeNodeAttributes($textarea, array('class' => 'textarea', 'id' => 'textarea', 'name' => 'textarea'));
     $I->seeNodeText($textarea, 'Textarea text');
 }
Exemplo n.º 2
0
    <h3>Inputs</h3>

    <div class="bs-docs-example">
        <?php 
echo TbHtml::textField('text', '', array('placeholder' => 'Text input'));
?>
    </div>
    <pre class="prettyprint linenums">
&lt;?php echo TbHtml::textField('text', '', array('placeholder' => 'Text input')); ?></pre>

    <h3>Text area</h3>

    <div class="bs-docs-example">
        <?php 
echo TbHtml::textArea('text', '', array('rows' => 3));
?>
    </div>
    <pre class="prettyprint linenums">
&lt;?php echo TbHtml::textArea('text', '', array('rows' => 3)); ?></pre>

    <h3>Checkboxes and radios</h3>

    <h4>Default (stacked)</h4>

    <div class="bs-docs-example">
        <?php 
echo TbHtml::checkBox('checkBox', '', array('label' => 'Option one is this and that—be sure to include why it\'s great'));
?>
        <br>
        <?php 
 public function testTextArea()
 {
     $I = $this->codeGuy;
     $html = TbHtml::textArea('textarea', 'Textarea text', array('class' => 'textarea'));
     $textarea = $I->createNode($html, 'textarea.form-control');
     $I->seeNodeAttributes($textarea, array('class' => 'textarea form-control', 'id' => 'textarea', 'name' => 'textarea'));
     $I->seeNodeText($textarea, 'Textarea text');
     $html = TbHtml::textArea('textarea', 'Textarea text', array('xs' => 6, 'md' => 6, 'class' => 'textarea'));
     $div = $I->createNode($html, 'div');
     $I->seeNodeCssClass($div, 'col-xs-6');
     $I->seeNodeCssClass($div, 'col-md-6');
     $textarea = $div->filter('textarea');
     $I->seeNodeAttributes($textarea, array('class' => 'textarea form-control', 'id' => 'textarea', 'name' => 'textarea'));
     $I->seeNodeText($textarea, 'Textarea text');
 }