In http://alanstorm.com/magento_system_configuration_in_depth_tutorial @AlanStorm gives a very good tutorial for system configuration.
He also explains how to use a <depends> tag to make a field show only when a specific value is set in another field.
My Q is how can I make fieldB visible if field A has either value V1 or V2. and are there any other options with the <depends> ?
Also If someone knows where in magento's code this is implemented I would also like to have a look at the code myself.
Thanks
If I correctly understand release notes from Magento 1.7.0.1, this functionnality has been implemented (http://goo.gl/ZgHG0). I have succeddfully tested it on a Magento CE 1.7.0.2.
You must declare a separator parameter in the field dependancy like this :
<depends>
<depends_from_field separator=",">
depends_from_field_value_1,depends_from_field_value_2
</depends_from_field>
</depends>
Note that depends_from_field_value_1
and depends_from_field_value_2
are separated by a comma, the exact symbol that is declared in separator=","
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With