surveyjs / survey-library

Free JavaScript form builder library with integration for React, Angular, Vue, jQuery, and Knockout.
https://surveyjs.io/form-library
MIT License
4.13k stars 804 forks source link

Subsection of the radiogroup/checkbox options #460

Open nadialo opened 7 years ago

nadialo commented 7 years ago

Are you requesting a feature, reporting a bug or ask a question?

ask a question or feature request

What is the current behavior?

All options cannot be divided into groups, they can only be listed in a list. No sub-title (text) can be inserted between answers.

What is the expected behavior?

https://jsfiddle.net/0jvndxmc/ I would like to have the above"sub-title" in between the options for checkbox or radio group. Is it possible to group the options in the current surveyjs version?

Specify your

andrewtelnov commented 7 years ago

@nadialo Do you mean something similar to description in google Form? They have question title and question description. Description is under question title in smaller font. If yes, this is exactly I think about several days ago.

Thank you, Andrew

nadialo commented 7 years ago

@andrewtelnov Similar but more than that. I want to implement titles for different group of options under one question. Just like my example in https://jsfiddle.net/0jvndxmc/. Do you know how to implement? If yes, could you please share with me?

Thanks a lot!

Nadia

dmitry-kurmanov commented 7 years ago

@nadialo hello, as a workaround you may try something like that: https://plnkr.co/edit/yXMgVIN0iEyoURghhJOG?p=preview

3 radiogroups with the same name

nadialo commented 7 years ago

@dmitrykurmanov Thanks for your suggestion :)

rafaelrroa commented 7 years ago

Sorry to reopen this issue, but if I apply iCheck to radiogroups, the proposed workaround does not work anymore... https://plnkr.co/edit/vPxbcqzYVk5fxgpPCuxg

Any suggestion to make this work again?

dmitry-kurmanov commented 7 years ago

@rafaelrroa, hello. In fact custom widgets is just possibility for adding any third party library but not the implementation. Implementations may be very different and every programmer can customize it by its own needs. Anyway, here an example for your usecase: https://plnkr.co/edit/iullEMm580t96KvlIJGp?p=preview. Thanks for your interest.

rafaelrroa commented 7 years ago

That solved my issue... Thank you so much

dmitry-kurmanov commented 7 years ago

@rafaelrroa, you are welcome, we will think about better "customWidget" provision.

nadialo commented 7 years ago

Sorry about reopening this issue.

I have applied this workaround, however if mark the question as mandatory (isRequired). I have to mark all of sub-questions and error messages(from each sub-questions) will be displayed if I missed the question. Since I only need one error message for that question, Any suggestion on this issue?

Another problem is if I apply the validation for this questionid(same questionid for every sub-question), no error message prompt out.

dmitry-kurmanov commented 7 years ago

@nadialo hello, thanks, we will think about these problems.

PS nothing wrong with reopen issue. Please feel free to create/close/reopen issues according to your needs.

SmartGDPR commented 4 years ago

Hi there,

We are really intereseted in such an enhancement here, for checkboxes. It'd solve an issue here with our respondant. Any idea when it could be done ?

I would suggest adding a field 'group' for every option (could be available also for radio & checkboxes).

Thanks a lot

tsv2013 commented 4 years ago

@SmartGDPR We keep this enhancement is in our plans. But I can't promise you any estimations right now.

novikov82 commented 2 years ago

https://surveyjs.answerdesk.io/ticket/details/T2797