| _text1 | | title | "Dependencies Example" |
|---|
| type | "string" |
|---|
| 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>" |
|---|
| options | |
|---|
|
|---|
| category | | title | "Category" |
|---|
| type | "string" |
|---|
| enum | | "Chocolates" |
| "Vegetables" |
| "Icecreams" |
|
|---|
|
|---|
| subcategory1 | | title | "Subcategory" |
|---|
| type | "string" |
|---|
| enum | | "Dark chocolate" |
| "Milk chocolate" |
| "White chocolate" |
| "Gianduja chocolate" |
|
|---|
| options | | dependencies | |
|---|
| grid_columns | 12 |
|---|
|
|---|
|
|---|
| subcategory2 | | title | "Subcategory" |
|---|
| type | "string" |
|---|
| enum | | "Broccoli" |
| "Cabbage" |
| "Carrot" |
| "Tomato" |
|
|---|
| options | | dependencies | |
|---|
| grid_columns | 12 |
|---|
|
|---|
|
|---|
| subcategory3 | | title | "Subcategory" |
|---|
| type | "string" |
|---|
| enum | | "Frozen yogurt" |
| "Booza" |
| "Ice milk" |
|
|---|
| options | | dependencies | |
|---|
| grid_columns | 12 |
|---|
|
|---|
|
|---|
| _text2 | | title | "Using Checkbox" |
|---|
| type | "string" |
|---|
| format | "hidden" |
|---|
| description | "<p>You can also use boolean checkbox with dependencies.</p>" |
|---|
| options | |
|---|
|
|---|
| billing | | title | "Billing address same as shipping address" |
|---|
| type | "boolean" |
|---|
| format | "checkbox" |
|---|
| default | false |
|---|
| options | |
|---|
|
|---|
| billingaddress | | title | "Billing address" |
|---|
| type | "string" |
|---|
| options | | dependencies | |
|---|
| grid_columns | 12 |
|---|
|
|---|
|
|---|