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
I'm not sure where in Alan's article it's explained, but there is how I do it: it's just a bit of javascript.
In your group you put a comment tag with the javascript embedded into .
For example, here is my code that checks the value of one field in order to show (or not) another one:
general
text
1002
1
1
1
checkExpirationPeriod = function() {
if ($('points_options_config_points_expiration_period').getValue() > 0) {
$('points_options_config_points_expiration_reminder').up(1).appear();
} else {
$('points_options_config_points_expiration_reminder').up(1).fade();
}
}
Event.observe(window, 'load', function() {
Event.observe('points_options_config_points_expiration_period', 'change', checkExpirationPeriod);
checkExpirationPeriod();
})
]]>
as you can see, I write a small function which check one field's value to determine if show another one or not. I then link the onchange event to the function and trigger the function to show correct fields as the page is loaded.
For your needs, just add the condition in the js function.
Hope That Helps