Generating A Table On The Results Page


#1

Hi, Nik

I want to generate a 3x12 table that shows up on the results page. Two of the columns will have text (which are set up as textareas in the Custom Fields) and one of the columns will display an image. (set up as an image in a Custom Field).

I’ve set up a test, but can’t seem to get the image to display …

Also, I’m keen for it to look nice and have each column lined up properly or even show up in a table where the cells have borders.

Any suggestions?

Cheers, Trudy


#2

Hi @Trudy,

How are you? Hope you’re well.

I created training on how to create a table for questions. Should work for results page.

https://www.leadshook.com/module-5/creating-decision-trees-adding-multiple-questions-per-node-table-format/

The basic pattern was to…

  1. Add a table (html and css)

  2. Add content (static or dynamic) inside the cells.

Please test and see if you can get the image to display without the table on your results page.

If yes, then it’s a table coding issue. If no, then please post your canvas url so I can see what’s happening.

Also please let m know if I have misunderstood your problem.

Nik


#3

Hi, Nik

Thanks for this.

I have created a table and I get how to do the html/css for the static text in the relevant columns/rows (columns 1 and 3). But what I can’t figure out is how to include a dynamic result based on a custom field in column 2

I want an emoticon image to show up in the 2nd row of the table using a custom field (DSI_Emotic)

Which emoticon image shows up is dependent on how each key question has been answered. I thought the logical place to do that was by using the DSI_Emotic custom field and displaying it for each question (using the relevant emoticon).

I was also putting the text there as well, but it looks nicer in the table :slight_smile:

Here’s the link to the decision tree.

https://west-island-digital.leadshook.io/survey/NUq3tVf62qxFSrrr60HgBIpOtTc4dR7angHjaszR?preview=true

Cheers, Trudy


#4

Hi @Trudy

In which question are you assigning emotional images.

I got this so it seems url is not formed.

I also added in the DSI_Emotic field as-is and don’t see any images.

I’m assuming assign of field has not been missed… if it has then here is how to do it.

Please confirm.

Nik


#5

Hi, Nik

Yes, I have assigned an image within the DSI_emotic custom field for each answer for about 8 or so questions.

How do I assign a URL to the image? I’ll go and have a look in the help files, but don’t remember seeing that one.

Cheers, Trudy


#6

@Trudy,

Images added at which question?

No need to do anything to the URL. I was merely pointing out that the URL is not showing an image and my best guess is there are no images to show.

Nik


#7

Hi, Nik

I’ve made a quick video showing you a bit more detail.

I know I’m missing a step somehow … and it will probably be embarrassingly simple … but I haven’t been able to figure it out.

Thanks for your help.

Cheers, Trudy


#8

@Trudy

There is an issue because the same field is getting multiple images as someone goes through the decision tree.

So the field got confused about what to display (first image, 2nd image, … , or last image).

Also the same field can’t be used for all rows of the table or else it will have the SAME face on all the rows.

You’ll need to create a new image field for each row of the table (i.e. each question). Then each row will display it’s unique icon. I think that’s the outcome you’re hoping for.

Correct?

Nik


#9

Thanks, Nik

You were correct. All sorted now and working.

Cheers, Trudy