Dynamic Questionaire Form

Dynamic Questionaire Form


I have created a questionaire app, where an admin can create questions, and the user gets to answer them.

I am trying the generate the question forrm that the user needs to fill out.
Some of the question are labels instead of questions, even though they are in the questions table. They also have there own style.

Answers are in a different table and have an answertype. So an answer can be a yes/no answer or text, or multiple choice or maybe even a signature (blob). All answers except for blobs are 50000 text field.

I can create an edit table for the questions but currently it looks very bland.

Is there a way to show each single record formatted to what the answer type is. I think I need a for loop in the interface that displays a single record
1. HAIR COLORS <- this is a label
1.1 Do you have hair ( yes no )   < drop down >

1.2 What is the natural color of your hair?
A. Brown < with tick boxes >
B. Green
C. Purple

1.3 Name <text field>

2. Hair is important! To check your hair blah blah blah... <- label information

As you can see this doesn't fit particuarly well into an edit table.

Have you guys got any suggestions ?

Could it be done with lots of "if's" in and edit table ?
Hi Michael,

I'd use a List Record (LR) instead of a Edit Table to show the questions - LR is a bit more flexible. Inside the LR I'd use an If for each type of question, since you want to display each type in a different way.

Using a LR will require you to save the data into the DB when the user clicks a button to submit (using a For Each, looping the contents of the LR and saving each one).
You may also want to check out the Survey component from the Forge, to see how it was built.
I'll try it now.
Hi Paul,
Hey that survey looks pretty good. I'll check it out.
Hi Michael,
I have had the same requirement and i succesfully completed it. You need to have  a type while creating a question (type of answer against the question  like is it a text box , dropdow or label) and based on the answer type you can render your control in list by adding if's.

Thanks guys,

I tried downloading the survey app from the forge, but it's looking for a crypto library. There 4 crypto libraries in the forge, so not sure which one it is. Is there someway to grab the library from the below reference ?
Hi Michael,
You can find it in forge (crypto extension) download it and deploy it in your enviormnet .
I'm fairly certain that missing Crypto extension is this one: http://www.outsystems.com/forge/component/956/crypto-aes/.
I had to publish it to the forge a while ago, although I'm not its author, because I was using it in some of my components and it wasn't available.
Yes it is crypto aes.