Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I show pictures using Confiforms?

Pedro Meireles April 27, 2018

Hi,

I have a form in Confiforms that has a file field which I use to store pictures. I'm trying to show the pictures on a page using the ConfiformsTableView and the Confirforms Form Field, but all I get is a blank space where the picture should appear. Is there any special thing I have to do to be able to show pictures stored in forms?

Regards,

Pedro

1 answer

0 votes
Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 3, 2018

What type of image file are you uploading? If you are using standard web image formats (png, jpeg, gif) then it should just work.

Pedro Meireles May 3, 2018

I'm using png images, but I've also tried with jpegs. The space where the image should appear is blank, as you can see in the bellow image.

 

confluence.png

Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 3, 2018

Below is a some example page storage format that works in my system. I have just one field in the below example (a field type field) and and table view that shows the field. When I upload png files into on my system I see them in the table view. Try this simplified example in your system. Does it work for you?

<ac:structured-macro ac:macro-id="ec998379-934c-4295-9681-624a6449d550" ac:name="confiform" ac:schema-version="1">
  <ac:parameter ac:name="formName">test</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="0dcd34b4-1615-4631-8714-abf66e9b0767" ac:name="confiform-field-definition" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">image</ac:parameter>
        <ac:parameter ac:name="fieldLabel">Image</ac:parameter>
        <ac:parameter ac:name="type">file</ac:parameter>
      </ac:structured-macro>
    </p>
    <ac:structured-macro ac:macro-id="d4fbda06-7c42-4571-9b8e-d99951ab1ff5" ac:name="confiform-entry-register" ac:schema-version="1">
      <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
      <ac:rich-text-body>
        <p>
          <br/>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
  </ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="f919f82b-3ddd-43ba-86c4-bee7ca1b9d70" ac:name="confiform-table" ac:schema-version="1">
  <ac:parameter ac:name="formName">test</ac:parameter>
  <ac:rich-text-body>
    <p>
      <ac:structured-macro ac:macro-id="7c6d0f06-d564-42f2-a566-24ee0178263e" ac:name="confiform-field" ac:schema-version="1">
        <ac:parameter ac:name="fieldName">image</ac:parameter>
      </ac:structured-macro>
    </p>
  </ac:rich-text-body>
</ac:structured-macro>
Pedro Meireles May 4, 2018

I think my problem is that I have two forms and I'm getting the photo from the second form. In the picture I've attached above, the fields "Turno" and "Profissional" are from one form and the fields "Contacto" and "Fotografia" are from another form. What I don't understand is why I can retrieve the field "Contacto" correctly but not the field "Fotografia", which is the photo. If I only list the second form then the photo appears corretly.

Alex Medved _ConfiForms_
Community Champion
June 28, 2018

@Pedro Meireles

How does your TableView looks like? How do you reference the "Fotografia" field?

Pedro Meireles June 29, 2018

Hi Alex,

Thanks for your answer.

 

My TableView looks like this:

TableView.png

I'm referencing the "Fotografia" field with "profissional.fotografia". I've also tried using "profissional.fotografia.asAttachment", but in this case what happens is that it shows the name of the attachment, like you can see here:

Screenshot_3.pngI really don't know what I have to do to be able to show the image.

 

Regards,

Pedro

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events