New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to add dynamic matrix column wise #1109
Comments
@ashygk column has properties: visibleIf and enableIf. The column will be still visible, but questions inside its cells may be invisible or disabled. Thank you, |
I really don't get it. Please find the below json.. The survey has a dynamic matrix.. I want the questions to be displayed left side in column wise (date, Amb device, amb distance...) and whenever I click add date, new columns should be added { |
@ashygk Arh, you want to add a new column on "Add Date +".
However, there is no a button for it. Thank you, |
i wanted to behave like this..where it add all columns when add date is selected..similar to dynamic matrix ..but to be displayed vertically |
@ashygk We do not have this functionality yet. Thank you, |
Even panel dynamic questions doesn't add question column wise.. They do in the row wise |
@ashygk In fact, it is a matrix dynamic where columns and rows are swapt. Thank you, |
Under the last row for each column |
@ashygk I have started to work on this functinality. I hope it will be available on the next week. Thank you, |
Thank you so much @andrewtelnov . I really appreciate your help in implementing this. |
Please use the below json for example: { |
@ashygk FYI: The feature has been implemented. Thank you, |
|
@ashygk I have got the survey json :) I would love to have a json result for one-two columns. Thank you, |
Survey Result: {"Current Level of Function":[{"Date":"2018-05-01","AmbDistance":"34","Amb Assistance\t":"D","Standing Tolerance\t":"high","UE Strength\t":"no ","Cognitive Function\t":"no function"},{"Date":"2018-05-09","AmbDistance":"23","Amb Assistance\t":"MAX","Standing Tolerance\t":"low","UE Strength\t":"yes","Cognitive Function\t":"blah blah"}]} |
surveydata : |
Thank you @andrewtelnov |
Hi, We have updated our applications, package.json to point to survey-angular: "1.0.25" to include the above functionality. |
SurveyData : |
@ashygk Unfortunately, I could not reproduce it :( Thank you, |
We have moved directly from survey-angular: 1.0.0 to 1.0.25 directly.. Is there any dependency? |
@ashygk the current version successful work with json created for the first release, more than two years ago. Thank you, |
The json is created with the online builder, which is using 1.0.25 Yes, we are using events for onComplete, onAfterRenderQuestion, onTextMarkdown, onUpdateQuestionCssClasses. That is all |
Could you please comment onAfterRenderQuestion, and then onTextMarkdown? Thank you, |
Tried, but no luck |
As per my analysis, function render(vnode, parent, callback) in the survey.angular.js, the parent is null which is why there is no html collection in the children and raising error. |
The above is for different survey "Current Problem" which has parent as above |
@ashygk Could you try to use non minimized/developer version and copy here the stack in our library. So we can get some ideas? Thank you, |
Is any way, we can reproduce this problem on a page? Thank you, |
Not sure, just happens when the survey has this new functionality..as all the other surveys are working fine |
the typeof elementid is still string.. there is an issue with document.getelementbyid(elementid), not sure why it is returning null.
|
You are saying it works for other jsons. It doesn’t make sense to me :( Thank you, |
Current Problem survey works. |
You may pass HtmlElement into the Survey constructor. Could you try it please? Thank you, |
Not sure which survey constructor you are talking about |
You may pass element Id or element itself. If it is an element, then there is no need for calling getElementById. |
We are not calling it..it is internally being called in the survey.angular.js render function. We are just making call Survey.SurveyNG.render(this.surveyName, { model: this.survey, css: cssConfig }); from our application.. that's it |
@ashygk Sorry for being confusing. I'm talking about this code:
Here is the updated plunker Thank you, |
Copied the above snippet. htmlEl is returning null for this survey |
@ashygk Then the problem somewhere in your code. SurveyJS starts to work after the render function is called. You just pass into the render function an invalid argument. Thank you, |
Ok. Also, i tried to include a dynamic matrix (vertical columns) in a separate survey. the survey still has columns showing horizontally. Changed the property of columnsLocation to vertical..works fine in online survey builder, not in our application |
And, addRowLocation is set to top, but still is at the bottom |
@ashygk I am afraid you are using the old version of SurveyJS for some reason on this page. Could you please recheck it? Unfortunately, I do not see any other reason. Thank you, |
Does newer version of surveyjs need knockout? I get these errors when i update to latest. ERROR in node_modules/survey-angular/survey.angular.d.ts(606,14): error TS2304: Cannot find name 'KnockoutObservable'. I have installed knockout using npm i knockout but still get the same errors |
@ashygk You do not need knockout, it is already inside the library. Thank you, |
Was this made mandatory after surveyjs 1.0.0? |
@ashygk Yes, we moved from pReact to knockout after v1.0.0 release, during a lot issues with pReact. Thank you, |
Included "types": [ "knockout" ] in tsconfig.app.json. Works now. I see the new functionality. |
@ashygk I just talked to the guys. You are right. Angular2+ requires knockout typings. I did not know about it. Thank you, |
@ashygk We have added the following issue Thank you, |
Hi @andrewtelnov |
Are you requesting a feature, reporting a bug or ask a question?
Question/Feature
What is the current behavior?
Able to add dynamic matrix row wise. is there a possibility to add them column wise?
What is the expected behavior?
Add the dynamic matrix questions column wise
How would you reproduce the current behavior (if this is a bug)?
Provide the test code and the tested page URL (if applicable)
Tested page URL:
Test code
Specify your
The text was updated successfully, but these errors were encountered: