Introduction
The Gravity Forms Settings API allows fields or sections to be shown or hidden based on the value of another field. You can specify a field name, a function, or a field name with specific values. If only a field name is given, the field is checked for any value.
Note: The dependency is only checked upon page load and does not fire with events. For instance, if your dependency is checking the value of a drop down, if that value is changed, the dependency is not checked again. To do this, you would need to force the page to submit so the dependency will be checked again upon page load.
Field name:
'dependency' => 'the_field_to_check',
Function to run:
'dependency' => array( $this, 'check_textfield_dependency' ),
Field name with an array of values:
'dependency' => array( 'field' => 'mytextfield_name', 'values' => array( 'test', 'test2' ) ),