Skip to content

Instantly share code, notes, and snippets.

@scottalan
Created December 9, 2011 07:04
Show Gist options
  • Save scottalan/1450563 to your computer and use it in GitHub Desktop.
Save scottalan/1450563 to your computer and use it in GitHub Desktop.
ctools
$form['profile-status'] = array(
'#type' => 'radios',
'#title' => '',
'#options' => array(
'new' => t('Create a new profile.'),
'select' => t('Use an existing profile.'),
),
);
$form['select'] = array(
'#type' => 'select',
'#title' => t('Select a profile'),
'#options' => $options,
'#process' => array('ctools_dependent_process'),
'#dependency' => array('radio:profile-status' => array('select')),
);
$form['profile-properties'] = array(
'#type' => 'fieldset',
'#title' => t('View the profile'),
'#process' => array('ctools_dependent_process'),
'#dependency' => array('radio:profile-status' => array('select')),
'#input' => true,
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment