I have a content type A
How can I add custom theme to edit page of that content type A in drupal 7 only for specific role ?
In my module,
function hook_form_alter(&$form,&$form_state,$form_id) {
if (form_id == 'content_type_a') {
global $user;
if (in_array('rad',$user->roles)) {
$form['#theme'][] = 'custom_content_type_a_node_form';
}
}
}
In my template.php file I have the following code
function hook_theme() {
return array(
'custom_content_type_a_node_form' => array(
'variables' => array('form' => NULL),
);
);
}
function THEMENAME_custom_content_type_a_node_form($form) {
// When I check here for $form I get an empty value
// I want to get the $form value derived from the form_alter function's $form //variable . How can I achieve it?
}
How can I retrieve the $form value from the hook_form_alter's $form variable?