How to show hide other content fields when we select radio buttons?
This could also be done by using states that are available in Drupal core. For example you could set that an element in a form should only be visible if another element has the value "x".

    $form['my_element']['#states'] = array(
      'visible' =&gt; array(
        ':input[name="some_other_element"]' =&gt; array('value' =&gt; 'some_value_that_has_to_be_set'),
      ),
    );


More examples at form_example_states_form.

You can add states to elements in an implementation of hook_form_alter or add it directly to the form if you are programming it yourself.