Open ghost opened 3 years ago
dependsOn: ["title"], Also this doesn't work either
Survey.Serializer.addProperty("text",
{name: "isRequired:switch",
dependsOn: ["readOnly"], visibleIf: (obj) => {return !obj.readOnly}
}
);
Here is the working plunker sample - https://plnkr.co/edit/IZ9J1JbJrJelXG1Q
Hello, thanks for the return. But addProperty("itemvalue",..) does not work at this value. Your example is different.
Do you want to conditionally hide this column in the choices editor?
Yeah, I want to hide it conditionally.
I can connect different properties. But he doesn't listen to her
I solved it this way. but it's not dynamic.
Survey
.Serializer
.addProperty("question", {
name: "tag:number",
});
Survey.Serializer.addProperty("itemvalue", { name: "price:number" });
Survey.Serializer.addProperty("itemvalue", { name: "tag:number" });
creator.onCanShowProperty.add(function (sender, options) {
if (!!options.parentObj && options.property.name == "price") {
options.canShow = options.property.tag == "10";
}
if (!!options.parentProperty && options.property.name == "tag") {
options.canShow = options.parentProperty.name == "rows";
}
});
What I want to do is add the show hide option.
This scenario is not supported in SurveyJS Creator v1.x.x We'll support it in v2 of SurveyJS Creator
Are you requesting a feature, reporting a bug or ask a question?
Bug
What is the current behavior?
Property Item Value visibleIf Not Working
What is the expected behavior?
https://surveyjs.io/Examples/Survey-Creator?id=dependsonproperties&theme=bootstrap#content-js Hiding a new field added with item value, as in the example
Survey .Serializer .addProperty("itemvalue", { name: "dateFormat", dependsOn: ["text"],
visibleIf: function() { return false; } });