how to hide text format tips for text field in a module, not theme? I need to hide the text format tips for body field, depending on user role, in a module. After some research, I found this kind of code:

function mymodule_form_node_form_alter(&amp;$form, &amp;$form_state) {
  if (isset($form['body'][LANGUAGE_NONE][0]['#after_build'])) {
    $form['body'][LANGUAGE_NONE][0]['#after_build'][] = 'mymodule_node_after_build';
  } else {
     $form['body'][LANGUAGE_NONE][0]['#after_build'] = array('mymodule_node_after_build');
  }
}
function mymodule_node_after_build(&amp;$form, &amp;$form_state) {
  /*if (!user_access('administer filters')) {
    $form['LANGUAGE_NONE']['0']['format']['#attributes']['class'][] = 'invisible';
  }*/
}


*I know the mymodule_node_after_build function is all commented, so
it's doing nothing, but it's here only for illustration. Just adding
#after_build to the form or field makes it all invisible - and this is the issue here.*

The above code results in field body not displayed at all, instead of just hiding text format info. More precisely, the html contains this code in place of the body field (just an empty div):

&lt;div class="field-type-text-with-summary field-name-body field-widget-text-textarea-with-summary form-wrapper" id="edit-body"&gt;&lt;/div&gt;


I tried setting this also for:

$form['body'][LANGUAGE_NONE]['#after_build']
$form['body']['#after_build']
$form['#after_build']


(the last one displays white space instead of the whole form)

Unless there is another much simpler solution to this problem, I'd like to use the above approach or something similar in a module, but it's not working!! So what's wrong with it?
Here is the simple code you can write your role base logic in hidetips_test_node_form_after_build() fuction.


function hidetips_form_node_form_alter(&$form, &$form_state) {
  $form['#after_build'][] = 'hidetips_test_node_form_after_build';
}

function hidetips_test_node_form_after_build($form) {
  // Here you can write your logic for role based hide and display.
  $form['body']['und']['0']['format']['#access'] = FALSE;
    return $form;
}