Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
en:guides:features:scripts:variables [2017/03/12 01:19]
irgendwer added more types I found ^^
en:guides:features:scripts:variables [2018/08/27 22:00] (current)
mxschmitt
Line 36: Line 36:
     type: '​select',​     type: '​select',​
     options: ['​Foo',​ '​Bar',​ '​Foobar',​ '​Barfoo'​]     options: ['​Foo',​ '​Bar',​ '​Foobar',​ '​Barfoo'​]
 +}
 +</​sxh>​
 +
 +Example of the condition type with the above options example:
 +
 +<sxh js>
 +{
 +    name: '​fooSwitch',​
 +    title: '​Selected fooType',​
 +    type: '​select',​
 +    conditions: [{        //make a field visible or invisible in the config with conditions
 +        field: '​fooType',​ //this will tell to use the config field with the name "​fooType"​
 +        value: 2,         //​this will tell to use the 3rd index of the options of the selected type in this case "​Foobar"​
 +    }]
 } }
 </​sxh>​ </​sxh>​