Hello,
So i'll start with how questions work, and this is me adding the property 'id' on questions :
Survey.Serializer.addProperty("question", {name: "id",category: "general"});
SurveyCreator.SurveyQuestionEditorDefinition.definition["question"].properties.push("id");
Now this code above should put the property 'id' on any question. But … if I try to change the question order by drag and drop, the question disappears from the screen. So this is a bug, or … there must be an alternative to this.
- Note that when doing the save, the question (and all the survey data) does get correctly passed to the backend
And then there's this :
Survey.Serializer.findProperty("question", "id").visible = false
This doesn't work, it works for any other property except this, it always shows it in the properties list
Going one step further on checkboxes, i've been told in a different ticket, that in order to add a property 'id' to checkboxes, i need to do this :
Survey.Serializer.addProperty("itemvalue", {name: "id",category: "general"});
SurveyCreator.SurveyQuestionEditorDefinition.definition["itemvalue[]@choices"].properties.push("id");
Now this, works perfectly EXCEPT, when i try to hide the ids of choices, by
- Survey.Serializer.findProperty("itemvalue", "id").visible = false
- Survey.Serializer.findProperty("itemvalue[]@choices", "id").visible = false;
But none of these actually do anything.
Recap : The ids of both questions and choices come generated from the backend, the survey 'creator' should not have access to modifying those ids.