Is it possible to set the image size of an attachment field on an exact form?

  • 1
  • 1
  • Question
  • Updated 2 years ago
  • Answered

I have an exact form that outputs multiple photos with a brief description under or above each photo. I want the print out to be one photo-with-description per page, and I have accomplished this by inserting page breaks between each photo-and-description set.

The problem I'm having is that the photo size in the printout is too big and this is pushing the photo description onto the next page. Is there a way to set a specific size of these photos on my exact form?

Thanks in advance.

Juan

Photo of Juan

Juan

  • 20 Points

Posted 5 years ago

  • 1
  • 1
Photo of Tracy

Tracy

  • 0 Points
It is best to control the image size prior to upload.
Photo of Keith

Keith, Champion

  • 1,148 Points 1k badge 2x thumb
try creating a new formula text field (Allow some HTML tags to be inserted in the field should be checked)

"<div><img src=\""&URLRoot()&"up/"& dbid() & "/a/r"& [Record ID#] &"/eFF/v0\" height=50;width=50;></div>"


FF=file attachment field id on your table


use this new field in the EF
Photo of Juan

Juan

  • 20 Points
Thank you! Works exactly as expected!
Photo of Rachel

Rachel

  • 0 Points
Can we set the field such that the user gets an error message if the file is too large?
Photo of David_In_Tucson

David_In_Tucson

  • 216 Points 100 badge 2x thumb
I used a variation on this theme.   My Exact form is indenting slightly.   The <div> in the text formula field reset this, so I took it out and it worked just fine.  Thanks.
Photo of Karen

Karen

  • 222 Points 100 badge 2x thumb

I'm trying to use this formula (with and without the <div>) and it's not working for me. :(

All that displays is a small black box with an x in the middle. Thoughts on how to fix? Thanks!


Photo of Matthew Neil

Matthew Neil

  • 31,698 Points 20k badge 2x thumb
This could be because you need to change the "FF" in the formula to the 'field ID' of your attachment field.

So if your fid for your attachment field was 25 it would read;

"<div><img src=\""&URLRoot()&"up/"& dbid() & "/a/r"& [Record ID#] &"/e25/v0\" height=50;width=50;></div>"
Then adjust the height and width as needed.
Photo of Karen

Karen

  • 222 Points 100 badge 2x thumb
Unfortunately, that isn't the problem. I've got the correct field id in the formula. Thanks though!
Photo of Matthew Neil

Matthew Neil

  • 31,698 Points 20k badge 2x thumb
What is the file type / extension that you are uploading to the file attachment field?  ... just trying to get to the bottom of this.
I edit the page direct and just added this where I wanted the image:

<p class=MsoNormal><span style='font-family:"Arial","sans-serif"'><img  width=347 height=63
  src="/up/bmkpfj7j5/g/rc/eg/va/logo.png"></span></p>