If you benefit from web2py hope you feel encouraged to pay it forward by contributing back to society in whatever form you choose!

  • 0
    javi  8 years ago

    Great tip,  but for me the comment of kmouts is a nice solution, i hacked it to make it appear the help icon in the same col of label and aligned to right:


    <script type="text/javascript">
        $(function() {
            $("td.w2p_fc").each(function() {
                var comment = $(this).html();
                var trl = this.parentNode.firstChild;
                if (comment) {
                    var text = $(trl).html;
                    $(trl).append('&nbsp;<i class="icon info icon-info-sign pull-right"></i>');
                    $(trl).children('i').attr('title', comment);
                        placement : 'top',
                        html : true,
                        trigger : 'click'

Commented on:

Shows tooltips in forms created via CRUD or SQLFORM with the field´s comment attribute.

Hosting graciously provided by:
Python Anywhere