uneditableField() public static method

Generates an uneditable input.
public static uneditableField ( string $value, array $htmlOptions = [] ) : string
$value string the value.
$htmlOptions array additional HTML attributes.
return string the generated input.
Example #1
0
echo TbHtml::controlsRow(array(TbHtml::textField('text', '', array('placeholder' => '.span1', 'span' => 1)), TbHtml::textField('text', '', array('placeholder' => '.span4', 'span' => 4))));
?>
    </div>
    <pre class="prettyprint linenums">
&lt;?php echo TbHtml::controls(TbHtml::textField('text', '', array('placeholder' => '.span5', 'span' => 5))); ?>
&lt;?php echo TbHtml::controlsRow(array(
    TbHtml::textField('text', '', array('placeholder' => '.span4', 'span' => 4)),
    TbHtml::textField('text', '', array('placeholder' => '.span1', 'span' => 1)),
)); ?>
...</pre>

    <h3>Uneditable inputs</h3>

    <div class="bs-docs-example">
        <?php 
echo TbHtml::uneditableField('Some value here');
?>
    </div>
    <pre class="prettyprint linenums">
&lt;?php echo TbHtml::uneditableField('uneditable', 'Some value here'); ?></pre>

    <h3>Form actions</h3>

    <div class="bs-docs-example form-inline">
        <?php 
echo TbHtml::formActions(array(TbHtml::submitButton('Save changes', array('color' => TbHtml::BUTTON_COLOR_PRIMARY)), TbHtml::button('Cancel')));
?>
    </div>
    <pre class="prettyprint linenums">
&lt;?php echo TbHtml::formActions(array(
    TbHtml::submitButton('Save changes', array('color' => TbHtml::BUTTON_COLOR_PRIMARY)),
Example #2
0
 public function testUneditableField()
 {
     $I = $this->codeGuy;
     $html = TbHtml::uneditableField('Uneditable text', array('class' => 'span'));
     $span = $I->createNode($html, 'span.uneditable-input');
     $I->seeNodeCssClass($span, 'span');
     $I->seeNodeText($span, 'Uneditable text');
 }