Help Popovers

Submitted by herent - 7 years ago

Often it's good to provide extra feedback for users when they edit your block. But real estate is limited. You can use some built-in hooks to create slick popups with very little effort. This uses bootstrap for the styling and display. If you want an icon that's not a (?) then check out the other options here: You can use this outside of blocks, too. In fact pretty much anywhere you have an a tag you can do it. And not just for help. The user does have to be logged in for it to work.

<?php defined('C5_EXECUTE') or die(_("Access Denied.")); ?>
<div class="control-group">
    <label for="maxHeight" class="control-label">
        <?php echo t("Max Height"); ?>
        <a id="block-help-max-height" 
           data-original-title="<?php echo t("Max Height"); ?>"
           t("This is the maximum height of the content parsed from the URL. "
                   . "<br /><br />If the theme applies padding or borders to the outer div "
                   . "or images, etc, it may end up taking up more space in the "
                   . "theme than expected.");
            <i class="icon-question-sign"></i>
    <div class="controls">
<?php echo $form->text("maxHeight", $maxHeight); ?>
<script type="text/javascript">
                .popover({ html: true})
                .click(function(e) {
Stats Categories Tags
comments powered by Disqus