This guide provides a step-by-step approach to correctly fill the fw_questionoptions table. This table stores the answer options (choices) for each question in your survey. It also manages display settings like the answer order, graph color, open answer text boxes, dynamic queries, and many more.
The table is directly linked to the fw_questionnairedetails table via qdetailid, meaning each question from QuestionnaireDetails has one or more corresponding answer options in fw_questionnairedetailsoptions.
You can find the detailed structure of the QuestionOptions table here: π Question Options Table Structure
This is the primary key (auto-incremented) for the table.
Do not manually enter this value if inserting data directly via the database.
It is automatically generated when you insert a new record.
qdetailid is the foreign key that links the option to a specific question from the fw_questionnairedetails table.
Without this linkage, the option will not appear in the survey.
Example: Suppose you have a question in fw_questionnairedetails with:
If you want to add an option like *βVery Satisfiedβ*, the qdetailid must be: `qdetailid = 1001`
This column controls the order in which options appear in the survey.
Example:
| optionorder | Option Text |
| 1 | Very Satisfied |
| 2 | Satisfied |
| 3 | Neutral |
| 4 | Dissatisfied |
| 5 | Very Dissatisfied |
So, the order in the survey will appear exactly as defined in optionorder.
This column allows you to define the display order of options in graph reports, which may differ from the survey display order.
Example: If you want the graph to show: - Very Dissatisfied β Left side of the graph - Very Satisfied β Right side of the graph
You can configure it like this:
| optionorder | Option Text | graphorder |
| 1 | Very Satisfied | 5 |
| 2 | Satisfied | 4 |
| 3 | Neutral | 3 |
| 4 | Dissatisfied | 2 |
| 5 | Very Dissatisfied | 1 |
So the graph will show Negative to Positive results.
This column is not standardized but can be used for custom purposes.
Possible use cases:
If unsure, leave this column as 0.
This column determines if the option should display an open text box next to it.
It is useful for options like βOther, please specifyβ.
Possible values:
Example: Option: *Other, please specify* `openanswer = 1`
If you want to show an open text box without any radio/checkbox, use this field.
Example: If you ask: *βWhat is your postal code?β*, you can configure: `openanswerforopt = 1`
This column allows you to set a custom color for the graph bar representing this option.
Example: - Hex Code: #FF0000 β Red - Hex Code: #00FF00 β Green
Set: `graphcolor = #00FF00`
This defines the text color of the option in the survey.
Example: - Black β #000000 - Red β #FF0000 - Blue β #0000FF
Set: `textcolor = #FF0000`
If you have a mobile app showing survey results, you can set a custom text color for app display.
Example: `apptextcolor = #00FF00`
For emotion-based questions (like smileys), you can define multiple colors separated by `^||^`.
Example: `emotioncolors = #FF0000^||^#00FF00^||^#0000FF`
You can upload an image/icon (like smileys or logos) for this option.
The file must be uploaded as BLOB (Binary Large Object).
Supported formats: - PNG - JPG - GIF
This column is specifically for Image Picker Questions where clicking an option shows an enlarged image.
Upload it as BLOB.
This controls the display size of the icon.
Default: 40px
Set: `iconsize = 60`
Defines whether the option is active or inactive.
Possible Values: - 1 β Active (shown in the survey) - 0 β Inactive (hidden)
If selecting an option should redirect the user to an information page, set this value.
Example: `redirecttoinfo = 1` β Redirect to info page.
This field allows you to dynamically load options from another table based on previous answers.
Example:
If selecting this option should trigger a database update, enter the query here.
Example: UPDATE fw_responses SET is_followup=1 WHERE optionid=5;
This column defines conditional display rules.
Example:
If selecting this option should disable/fade other options, set this as: `excludeotheropts = 1`
If selecting this option should hide others from reports, enter their IDs separated by comma.
Example: `hideinreports = 5,6,7`
If you want options to randomize on each survey load, set: `randomorder = 1`
If this option should not appear in bubble graphs, set: `hideinbubblegraph = 1`
This assigns a score to the option (useful for NPS or scoring-based questions).
Example: - Very Satisfied β Score 5 - Dissatisfied β Score 1