Open SamMousa opened 9 months ago
Hi @SamMousa, Thank you for sharing your idea. I suppose that you wish to implement the following type of a question.
Q: When you think about [insert industry], what brands come to mind first? List up to 5.
[Text box #1]
[Text box #2]
[Text box #3]
[Text box #4]
[Text box #5]
Or, do you wish to implement other kind of a question? Please share an example.
That's exactly it! Functionality might include adding the rows dynamically, ie have a new text field automatically appear as soon as the last one is nonempty.
Thank you for the clarification. Have you considered using a Multi-Selection Matrix or Dynamic Matrix with the Text cell input type?
Yes, but they take up a lot of space and we concluded that the "best" workaround for now is using multiple text with empty labels (or even just hiding the label using CSS). This is just not a very user friendly solution.
A checkbox option: don't show labels
would also just solve the problem btw.
Hi @SamMousa , Thank you for the clarification. I played around with different survey settings and managed to produce three alternatives.
Option 1 - Multiple Textboxes without Labels
Hide Multiple Textboxes question labels. For this, set the item
's title to an empty string.
{
"type": "multipletext",
"name": "question1",
"title": "When you think about [insert industry], what brands come to mind first? List up to 5.",
"items": [
{
"name": "text1",
"title": " "
},
{
"name": "text2",
"title": " "
},
{
"name": "text3",
"title": " "
},
{
"name": "text4",
"title": " "
},
{
"name": "text5",
"title": " "
}
]
}
Option 2 - Combine Single-Text input fields within a panel
{
"type": "panel",
"name": "panel1",
"elements": [
{
"type": "text",
"name": "question2"
},
{
"type": "text",
"name": "question3"
},
{
"type": "text",
"name": "question4"
},
{
"type": "text",
"name": "question5"
},
{
"type": "text",
"name": "question7"
}
],
"questionTitleLocation": "hidden",
"title": "When you think about [insert industry], what brands come to mind first? List up to 5."
}
Options 3: Use a Dynamic Matrix
{
"type": "matrixdynamic",
"name": "question6",
"title": "When you think about [insert industry], what brands come to mind first? List up to 5.",
"showHeader": false,
"columns": [
{
"name": "Column 1",
"cellType": "text"
}
],
"choices": [
1,
2,
3,
4,
5
],
"allowRemoveRows": false,
"rowCount": 5
}
With this option, you'll get an extra feature because users will be able to add rows.
You may notice that questions above look compact. This layout was produced by customizing a survey theme.
The Scale
(sjs-base-unit
) parameter controls how much space will be around survey elements. You can also adjust other theme settings to produce the layout which best suits your needs.
I created the following demo for your reference: View Plunker. It contains above question options and a customized theme file.
I hope either alternative may work for you. Please let me know if you have any further questions.
Thanks
Hi Jane,
That's really not the reason I make these tickets. I'm aware of the ways to work around it, note that customizing the theme would need to be done for every theme we use. Also it requires further knowledge if we only want to apply it to a specific question etc.
All of these solutions are workarounds; and in my original post I noted I already had one. The point is to make the library better, so I make suggestions.
If you think having a question type for this, or in this case a setting to hide labels, is not a good addition that's fine. But please don't waste your time on finding workarounds for my sake!
The goal in my opinion is not for a developer (like me) to be able to create this question type, but for every user who goes to https://surveyjs.io/create-free-survey
to simply do so.
Edit: my goal is not to reopen, just don't spend your valuable time on creating workarounds ;-)
Are you requesting a feature, reporting a bug or asking a question?
Feature
What is the current behavior?
In research you have a question type called unaided brand awareness which requires multiple text inputs but has no real concept of rows.
What is the expected behavior?
I'd love a question type that supports this, currently the solution is to add empty labels
to each row, but that feels like an ugly workaround.