TbHtml::uneditableField PHP Method

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.
    public static function uneditableField($value, $htmlOptions = array())
    {
        self::addCssClass('uneditable-input', $htmlOptions);
        $htmlOptions = self::normalizeInputOptions($htmlOptions);
        return self::tag('span', $htmlOptions, $value);
    }

Usage Example

Exemplo n.º 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)),
All Usage Examples Of TbHtml::uneditableField
TbHtml