Display Logo on Form

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
Looking at have a Logo on all new entry form. the form will be a questionnaire, so I'm looking for it to display with a file attachment.
Photo of Ryan

Ryan

  • 940 Points 500 badge 2x thumb

Posted 1 year ago

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

QuickBaseCoach App Dev./Training, Champion

  • 53,038 Points 50k badge 2x thumb
I think that this is my cleanest formuals  to show an image on a form and control the size.  I presume from your question that each record will have its own logo, but I may have assumed incorrectly and you in fact want the same logo in every form.


var text FileType = Right(ToText([file attachment2]),".");

If(Contains("jpg, jpeg, png",$FileType),
"<img src=" & URLRoot() & "up/" & Dbid() & "/a/r" & [Record ID#] & "/e282/v0' width='75' >")


In the example above Field ID 282 has the file attachment.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 53,038 Points 50k badge 2x thumb
Is the form being used for non Quick Base users?  or just internal staff?
Photo of Ryan

Ryan

  • 940 Points 500 badge 2x thumb
no, the employees are filling it in live time.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 53,038 Points 50k badge 2x thumb
last quesiton: what did you mean by this

"so I'm looking for it to display with a file attachment."
Photo of Ryan

Ryan

  • 940 Points 500 badge 2x thumb
i'm not. i want it at the top of the form. i did not want to add a file attachment to do it. just want the logo appearing at the top of the form
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 53,038 Points 50k badge 2x thumb
OK, 
if you load a file attachment somewhere where all employees have access that table, (even a new table in your app called logos), and then click the file attachment, it will render in the browser. 

You can then simply put a text element on the form with this syntax
<img src=https://mycompany.quickbase.com/up/bbeevg2wq/g/rt/eh/va/Division9LogoSmall.jpg>


ie, take the url that you see when you click on that icon and then copy and paste it into the text element field  on the form and wrap it with that <img src= and the closing > 

enable html for that text box.