how to use an icon instead of a button

  • 0
  • 3
  • Question
  • Updated 2 years ago
  • Answered
I have a button "Add Notes" that opens a new record in a new table.  How can I use an icon for Add notes instead of the button. I want to use the icon for mail instead of the button
Photo of Shontay

Shontay

  • 490 Points 250 badge 2x thumb

Posted 2 years ago

  • 0
  • 3
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,046 Points 50k badge 2x thumb
You can make a hyperlink which uses an icon.

It would be a formula text field with html enabled.

Not tested, but try this

var text Image = "<img src=https://images.quickbase.com/si/48/016-email_1.png>";
var text URL = [Add Notes];
"<a href=" & $URL & ">" & $Image & "</a>"
(Edited)
Photo of Mick Graham

Mick Graham

  • 330 Points 250 badge 2x thumb
or you could create a formula text field that runs the formula url and use can use the built in classes to make the button coloured.

"<a class='Vibrant Success' href=' " & [URL Add Notes Field] & " '> Add Notes </a>"   

change Viberant Success to 

Vibrant
Vibrant Danger
Vibrant Alert
Vibrant Primary
Vibrant Snowy

Which would give you 6 different coloured button options.
Photo of Shontay

Shontay

  • 490 Points 250 badge 2x thumb
Thank I did get the icon to work, Do you know how to make the icon a mouse hover over to display a field from the related table.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,046 Points 50k badge 2x thumb
Can you post that as a new question along with your current code.  I don't have time to answer immediately, but perhaps someone else knows the answer quickly.