We generate a composite question, named compoQuestion
, which encompasses four types of questions (boolean, drop-down, comment, and file-upload). As a standard practice, when we intend to manage the properties of these four questions, we must initially incorporate those properties into the properties list of compoQuestion
. Subsequently, when any property undergoes a change, we propagate that change to the respective target question. This process works seamlessly for most property types, such as strings, booleans, and choices.
However, a particular question arises regarding how to control the choicesByUrl
property specifically for the drop-down question. How do we integrate choicesByUrl
into compoQuestion
and subsequently propagate the effect to the drop-down question?
adding custom property to compoQuestion like
JSONconst propertyInfo = {
name:`choicesByUrl`,
displayName: `choicesByUrl`,
type: "restfull",
className: "ChoicesRestful",
onGetValue: function (surveyElement: { choicesByUrl: ChoicesRestful; }) {
return surveyElement.choicesByUrl.getData() ;
},
onSetValue: function (surveyElement: { setPropertyValue: (arg0: string, arg1: any) => void; }, value: any) {
surveyElement.setPropertyValue("choicesByUrl", value);
},
category: "choicesByUrl"
};
cause a lot of error.
Any suggestions?
Hello Belal,
I may need additional time to consider a possible option. Please stay tuned.