Discussions

Expand all | Collapse all

URL Formula Button to display picture

  • 1.  URL Formula Button to display picture

    Posted 30 days ago

    Hello,

    Is it possible to have a button display an image instead of text?

    Thank you



    ------------------------------
    Mackenzie Phillips
    ------------------------------


  • 2.  RE: URL Formula Button to display picture

    Posted 30 days ago

    Yes, there are different ways to do this, depending on your intended result. If you want to explore the possibility of creating a button with both text and an icon, there's a great app in the Exchange called "Rich Text Button Tool Box (Empower 2019)". This app is setup to allow you to build buttons right there and then presents you with the necessary formula you'll need to recreate it in the intended app.

    If you're looking to just have an image/icon, there are probably a couple of different ways to do that as well. The way that I've done it in the past is this formula:

    var text tk = "Your App Token";
    var text name = "My Button Name";
    var text img = "The URL to my image in Quick Base";
    var text bgcolor = "The HEX code for the background color I want";
    var text URL = "The URL that I want the button to use";
    
    //The settings for the box surrounding my icon/button
    var text box = "<table bgcolor='#FFFFFF' style='padding: 2px;padding-left: 5px;top: 50%;		margin-top: -12px;vertical-align: middle;'><td width=50 style='text-align:left;vertical-align:middle;'>";
    
    "<div title='" & $name  & "'>"& $box &
    
    "<a href=" & 
    
        $URL
                
            & " target='_top'><img src='" & $img & "' style='width:64px;height:64px;border:0'>" 
            & "</td>" & "</a>"
            	
    & "</table>" & "</div>"


    ------------------------------
    Blake Harrison
    bharrison@datablender.io
    DataBlender - Quick Base Solution Provider
    Atlanta GA
    404.800.1702 / http://datablender.io/
    ------------------------------