Dependencies: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 6: | Line 6: | ||
"title": "Dependencies Example", | "title": "Dependencies Example", | ||
"type": "string", | "type": "string", | ||
"format": "hidden", | "x-format": "hidden", | ||
"description": "<p>This example shows the use of the <strong>dependencies<\/strong> option, where you can have a field depend on the value of another field.<\/p><p>This works by creating all dependant element and then hide\/show the selected one. So this feature works best if fields are placed vertically.<\/p>" | "description": "<p>This example shows the use of the <strong>dependencies<\/strong> option, where you can have a field depend on the value of another field.<\/p><p>This works by creating all dependant element and then hide\/show the selected one. So this feature works best if fields are placed vertically.<\/p>" | ||
}, | }, | ||
"category": { | "category": { | ||
"title": "Category", | "title": "Category", | ||
"type": "string", | "type": "string", | ||
| Line 37: | Line 27: | ||
"Gianduja chocolate" | "Gianduja chocolate" | ||
], | ], | ||
" | "x-dependency": { | ||
"category": "Chocolates" | |||
} | } | ||
}, | }, | ||
| Line 58: | Line 40: | ||
"Tomato" | "Tomato" | ||
], | ], | ||
" | "x-dependency": { | ||
"category": "Vegetables" | |||
} | } | ||
}, | }, | ||
| Line 78: | Line 52: | ||
"Ice milk" | "Ice milk" | ||
], | ], | ||
" | "x-dependency": { | ||
"category": "Icecreams" | |||
} | } | ||
}, | }, | ||
| Line 102: | Line 59: | ||
"title": "Billing address same as shipping address", | "title": "Billing address same as shipping address", | ||
"type": "boolean", | "type": "boolean", | ||
" | "x-input": "OO.ui.CheckboxInputWidget", | ||
"default": false | "default": false | ||
}, | }, | ||
"billingaddress": { | "billingaddress": { | ||
"title": "Billing address", | "title": "Billing address", | ||
"type": "string", | "type": "string", | ||
" | "x-dependency": { | ||
"billing": false | |||
} | } | ||
} | } | ||
} | } | ||
} | } | ||
Latest revision as of 00:00, 15 January 2001
| title | "Dependencies" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| type | "object" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| properties |
|