brutusin / brutusin/json-forms

Multiple dependency input function

Open
#140 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
618
Forks
171
PR merge metrics
No merged PRs in 30d

Description

Hey ,

**Code:**

`function (names, data, cb) {
var schemas = new Object();
var schema = new Object();

schema.type = "string";

if (data.option1 === "efg") {

schema.title = "efg";
schema.enum = ["", ""]

} else if (data.option1 === "abc") {
schema.title = "abc";
schema.enum = ["", ""]
}

schemas["$.suboption1"] = schema;
setTimeout(function(){cb(schemas)},500); // in order to show asynchrony
}`

How can i get dynamic value instead of "option1" , what parameter should i pass to get **Parent Option's Id**

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.