Tooltips
Twitter bootstrap Documentation
Examples
Twitter bootstrap Documentation
- Result
- Source
<?php
foreach (
[
'top' => 'Tooltip on top',
'right' => 'Tooltip on right',
'bottom' => 'Tooltip on bottom',
'left' => 'Tooltip on left',
] as $placement => $label
) {
echo $this->formButton()->renderSpec([
'options' => [
'label' => $label,
'tooltip' => [
'placement' => $placement,
'content' => $label,
],
],
]);
}
// With custom HTML added:
echo $this->formButton()->renderSpec([
'options' => [
'label' => 'Tooltip with HTML',
'tooltip' => '<em>Tooltip</em> <u>with</u> <b>HTML</b>',
],
]);
Usage
Twitter bootstrap Documentation
Disabled elements
Twitter bootstrap Documentation
- Result
- Source
<?php
echo $this->formButton()->renderSpec([
'options' => [
'label' => 'Disabled button',
'tooltip' => 'Disabled tooltip',
'variant' => 'primary',
],
'attributes' => ['disabled' => true],
]);