Survey setup - multi grid question\answers

Hi @Atila

I can see what you are trying to do and even though I have not tried this in Wappler I am very familiar with survey architecture.

Looking at this I would say you need a repeat group for the question and nested repeat group inside the questions for the options.

I am not sure how you do this in Wappler but suggest maybe you take a look at this:

Start first by creating a repeat group to get each question to show, then work on inserting a repeat group to show the question options.

I suspect you are going to have to do some deep dive to show those headers and then present the options.

It might look something like this.

   > Question option
        > Question scale

hey @StevenM

thanks man, i will try following what you`ve suggested.

1 Like

I’ll be doing something very similar in a few weeks time so I’ll share my solution if you are still looking for some help!

But yes, my approach would be nested repeat regions as @StevenM says…

One going horizontally for the colours, so maybe displayed using a Flex Container which gives horizontal placement, or an HTML table structure.

One going vertically so perhaps a row/column structure, with the flex container in the column.

I just start with an idea for something like this, try it out, see what works and slowly iterate towards the solution!


thnx @Antony. I would appreciate if you could msg me once you on it, i would like to follow.

So far, i have managed to load questions and answers using repeat.

I am stuck in 2 things

  1. how to force the answer buttons to appear in single line
  2. how to define that each answer will have its own color? (right now i am able to set a single color for a button)
  3. in case i want to split the q\a to few pages, will adding Dynamic Paging after repeat2 will do the job???

thank you!

Hey all,

please advice how to modify that all buttons appear in single line??

please advice how to define each answer\button to have different color??

thank you!

You are using a repeat so it creates a div around each of your buttons. Divs are block elements so they appear on a separate line.

You need to use repeat children so that the buttons are repeated inside the repeat children region like:

    <button id="btn1">My button</button>
    <button id="btn2">My button</button>
    <button id="btn3">My button</button>
    <button id="btn4">My button</button>

instead of what currently happens:

    <button id="btn1">My button</button>
    <button id="btn2">My button</button>
    <button id="btn3">My button</button>
    <button id="btn4">My button</button>

thx @Teodor ,

thanks, i have changed to repeat children as you suggested, and added button

Now i see 4 buttons in a row,
i have used data binding to modify to display the answer_name value,

how do i setup that each button will have different color??

@Teodor, i have tried to follow Set Table Row Background Color with Dynamic Value

using class toggle, without success, please advice…

I don’t think your expression is right.
What is the exact expression generated?

so I have questions and answers (all stored in DB)

each question has column answer_type 1\2\3 --> and answer table has each answer group marked as type,

yes\no is type 1 Green\Yellow\Orange\Red is type 2

Each answer has field answer_score.

the answers are loaded dynamically according to each question .

Goal is to set different colors for each button within the answers

so textual value of each answer i load via:

in order to modify dynamically the button colors, i`ve tried using call toggle, by setting a condition
answer_score > xx

How did you enter the > 2 part exactly?
And what is the exact code generated? It looks wrong to me in your screenshot.

tried both typing

and via data format - operation properties


I have managed to make it work as follows:

meaning that 2 answer options`s answer_score is above 2

my question is, is it possible to define several “rules” so each answer will have its own color,

please advice the direction i should follow to achieve it.

Just add more Class Toggles the same way you added the one you have. :slight_smile:

1 Like

:slight_smile: :grinning:

thnx man

1 Like

hey guys,
@StevenM @Teodor @brad

I have followed your guides and managed to get the form questions and answers to appear as above.

but then i wanted to add paging, since there were too many questions on single page.

Since there was no limit field in database query, i`ve changed it to

database paged query, then added limit=10, added on app–>query manager, the offset and added pagination.

now paging works, BUT answers are not shown anymore…
please advice


The only thing I can see right off the top is that you may have entered your limit in the wrong place.

In your server connect query you should still have …

And then in the App Connect you need to select your serverconnect recordset and set your limit there.

i just changed what you pointed, which is logical, but now the questions aren’t loaded on the page

hey guys,

managed to move forward.
my issue now conserns paging,
for some reason it does not work

I have tried to follow guides on the website, but on the example, bootstrap table used, and when select data source for paging, i do see offset and limit, while here i do NOT.

another strange thing is, that now only 25 rows loaded, while there are 39, not sure where do i control that.

please help

@Teodor ?

can anyone help with it?>