Question:
I have several panels on one page and want to get count of collapsed and expanded panels on specific moment
can not find some method as I want. There are just panel's property isCollapsed/Expanded and now I need use loop for check each panel on the page, and when I am changing the panel state I need use loop again.
Maybe you can help me and say what methods are better for my issue
@NafanyaVictorovna Hello! Could you please check getAllPanels method? So you can get all panels and do the loop.
@dmitrykurmanov Not sure, that is better for me, because that method returns all panels for survey, not for page
@NafanyaVictorovna may be this properties may help : https://surveyjs.io/Documentation/Library/?id=surveymodel#currentPage and https://surveyjs.io/Documentation/Library/?id=panelmodel#page
so you can check panel.page.id === survey.currentPage.id
@dmitrykurmanov it's not best for me. but thanx.
Also I have question: I want to restyle checkbox/radio buttons, but when I tried to add my styles to the buttons they are not properly by styles, I have some combination now, how I can full restyle it?
@NafanyaVictorovna I've implemented page.getPanels() method for better user experience.
As for your second question, I need to understand what are you trying to achieve. Could you please describe your use case in greater details? And please look at this custom widget https://surveyjs.io/Examples/Library/?id=custom-widget-icheck&platform=jQuery&theme=default may . If you need very complex customization you can create your own custom widget.
@dmitrykurmanov Thanks a lot for your update and example. I've downloaded that plug in and restyle all my radio and checkbox buttons as I wanted.
@dmitrykurmanov hello again. I have some problems with I check library.
I have different questions, with the same answers (radio buttons) and part of questions work fine, when I select one case, but others work with console mistake, and I can't check answer after first click
Could you please provide an example to see these console errors?
@dmitrykurmanov if you meant json - it's ordinary radio buttons (more than 2 cases)
I have long complicated assessment, with several pages and for each question with radio/checkbox buttons choice (where are more than 2 cases) I have that problem:
when I select answer first time i had error:
Uncaught Error: Syntax error, unrecognized expression: input[value=myValueName] in icheck file.
I downloaded files from icheck github, and use icheck.min.js.
So, here is the example with json.
Please, look at the matrix https://plnkr.co/edit/RYYF8txxUtG5Au79IgFB?p=preview
But I haven't problems with matrix on my view, just with checkboxes and radio. Also, when the error is, and I change tab radio/checkbox buttons are absent in several fields by random.
@NafanyaVictorovna thank you for the example. Is is a bug. I've created an issue in widgets repo: https://github.com/surveyjs/widgets/issues/87 because it is bug with iCheck widget.