Closed cracki closed 6 years ago
@cracki
Survey.JsonObject.metaData.findProperty("survey", "showQuestionNumbers").default = "off";
However, it would only tells survey do not serialize showQuestionNumber with property "off".
You must to override the getter of the showQuestionNumbers property. It can be done, thanks to JavaScript magic. Here is the example
thank you i want to set "off" the value in editor mode.
default = "off" not worked
Sure, I wrote it would not work. You have to override getter. Have you copied the code for overriding property in plunker I gave?
Thank you, Andrew
yes i copy plunker codes i get: "TypeError: this.getPropertyValue is not a function"
@cracki It works fine for me, here is the form bulder example
Thank you, Andrew
Thank You 👍
Hi @andrewtelnov Hi, I am following this example to integrate the editor with React.
And I want to hide question number like @cracki wanted. I couldn't get it working using the plunker example because 'Survey' object is not defined in the component.
I tried to import Survey from 'survey-react'. But it didn't do the trick. Can you tell me what am I missing here?
Thanks
@irshadnilam Please use this repo to start with react.
Thank you, Andrew
@andrewtelnov I am using that repo as I've mentioned above. I want to achieve what the original poster did using react.
@irshadnilam I've tried to add the code above to react quickstart repo and it works ok for me.
Please check this code : https://github.com/surveyjs/surveyjs_react_quickstart/blob/master/src/App.js#L256
we have link to Survey object here and it exist
How i can set Property value?
For example i want to set "showQuestionNumbers" to "off" by default
Survey.JsonObject.metaData.findProperty("survey", "showQuestionNumbers")
How to set it? Thank you