Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Implements hook_form_FORM_ID_alter().
- */
- function MODULENAME_form_CONTENTTYPENAME_node_form_alter(&$form, &$form_state) {
- $form['text_field']['#states'] = array(
- 'visible' => array(
- ':input[name="radio_field"]' => array('value' => 'value_of_textfield_option'),
- ),
- );
- $form['integar_field']['#states'] = array(
- 'visible' => array(
- ':input[name="radio_field"]' => array('value' => 'value_of_integarfield_option'),
- ),
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement